@charset "UTF-8";

:root {
  --bg: #f5f7fb;
  --surface: #fff;
  --ink: #182230;
  --muted: #667085;
  --line: #e4e7ec;
  --blue: #155eef;
  --blue-soft: #eff4ff;
  --green: #087c6b;
  --red: #d92d20;
}

* { box-sizing: border-box; }

.metrika-pixel { position: absolute; left: -9999px; }

html { scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.5 Inter, "Segoe UI", Arial, sans-serif;
}

button,
input,
select { font: inherit; }

.shell {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

/* Header and primary navigation */
.bar { padding-top: 18px; }

.barin {
  width: min(1488px, calc(100% - 24px));
  min-height: 64px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}

.bar-content,
.barin > .bar-content.shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 24px));
  min-height: 64px;
  margin-inline: auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand { gap: 10px; }

.brand-logo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 760;
  letter-spacing: -.5px;
}

.brand-title sup {
  margin-left: 2px;
  color: var(--muted);
  font-size: .7em;
  font-weight: 400;
  vertical-align: top;
}

.brand-tagline {
  margin-top: 4px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding-inline: .625rem;
  border-radius: .5rem;
  color: inherit;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.nav-link:hover { background: #eff4ff; color: #344054; }

.nav-link:focus-visible,
.nav-login:focus-visible,
.nav-logout:focus-visible {
  outline: 3px solid #b2ddff;
  outline-offset: 3px;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding-inline: .875rem;
  border: 1px solid var(--blue);
  border-radius: .5rem;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.nav-login:hover {
  border-color: #004eeb;
  background: #004eeb;
  color: #fff;
}

.nav-login:disabled { cursor: default; }

.nav-account {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  color: var(--ink);
  font-size: .8125rem;
}

.nav-account img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.nav-account-name {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding-inline: .75rem;
  border: 1px solid #d0d5dd;
  border-radius: .5rem;
  background: #fff;
  color: #475467;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.nav-logout:hover {
  border-color: #b2ddff;
  background: #eff4ff;
  color: var(--blue);
}

/* Page heading and common controls */
.head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 24px;
}

.head h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -.9px;
}

.head p { margin: 5px 0 0; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* Header service actions should read as quiet utility controls. */
.actions .btn { font-weight: 400; }

.actions .btn.is-demo-attention {
  position: relative;
  border-color: #2e90fa;
  background: linear-gradient(110deg, #004eeb 0%, #1570ef 34%, #53b1fd 50%, #1570ef 66%, #004eeb 100%);
  background-size: 260% 100%;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(21, 94, 239, .42), 0 8px 18px rgba(21, 94, 239, .28);
  animation: demo-attention-shimmer 1.65s linear infinite, demo-attention-pulse 1.65s ease-in-out infinite;
}

.actions .btn.is-demo-attention:hover {
  border-color: #84caff;
  background-color: #004eeb;
  color: #fff;
}

@keyframes demo-attention-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes demo-attention-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21, 94, 239, .46), 0 8px 18px rgba(21, 94, 239, .26); }
  50% { box-shadow: 0 0 0 7px rgba(21, 94, 239, 0), 0 10px 24px rgba(21, 94, 239, .42); }
}

.btn {
  min-height: 2.25rem;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: #344054;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.btn:hover { background: #f9fafb; }

.btn.primary {
  padding-inline: 18px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
}

.hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: #475467;
  font-size: 13px;
}

.hint b { color: #344054; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 4px #d1fadf;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 10px;
}

.section-title h2,
.results-heading h2 {
  margin: 0;
  font-size: 1.125rem;
  letter-spacing: -.2px;
}

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

/* Summary cards */
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card,
.result-market {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}

.card { padding: 17px; border-radius: 13px; }

.card-top,
.market-head,
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-top { margin-bottom: 15px; }

.card h3 { margin: 0; font-size: 16px; letter-spacing: -.1px; }

.icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  cursor: pointer;
}

.icon:hover { background: #dbe8ff; }

.icon-tax::before { content: "%"; font-size: .9rem; font-weight: 750; line-height: 1; }

.icon-svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rows { display: grid; gap: 9px; }

.row { display: flex; justify-content: space-between; gap: 10px; }

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

.value { color: #344054; font-weight: 650; text-align: right; }
.value.is-empty { font-weight: 400; }

.card .label,
.market .label { font-size: 1rem; }

.edit-wrap { margin-top: 1.25rem; }

.edit {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin: -.375rem -.5rem;
  padding: .375rem .5rem;
  border: 0;
  border-radius: .5rem;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
}

.edit:hover { background: #eff4ff; }

.edit:focus-visible {
  outline: 3px solid #dbe8ff;
  outline-offset: 2px;
}

/* The visible edit label is also the full-card link to the matching modal. */
.card.is-editable,
.market.is-editable { position: relative; }

/* Keep a deliberate visual gap between the final value and the edit label. */
.card.is-editable { padding-bottom: 36px; }

.is-editable > .edit-wrap,
.is-editable > .market-foot { position: static; }

.is-editable > .edit-wrap > .edit,
.is-editable > .market-foot > .edit {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  margin: 0;
  padding: 0 17px 17px;
  border-radius: 13px;
  background: transparent;
  text-decoration: none;
}

.is-editable > .edit-wrap > .edit:hover,
.is-editable > .market-foot > .edit:hover { background: rgba(21, 94, 239, .035); }

.card.is-editable .icon { pointer-events: none; cursor: default; }

.is-editable > .edit-wrap > .edit:focus-visible,
.is-editable > .market-foot > .edit:focus-visible {
  outline: 3px solid #b2ddff;
  outline-offset: -3px;
}

/* Marketplace conditions */
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.market {
  --accent: var(--blue);
  --tint: var(--blue-soft);
  position: relative;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: opacity .16s ease, filter .16s ease;
}

.market::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  content: "";
}

.market-wb { --accent: #8e37e9; --tint: #f9f5ff; }
.market-ozon { --accent: #155eef; --tint: #eff4ff; }
.market-yandex { --accent: #e6572e; --tint: #fff6ed; }

.market-head { margin-bottom: 16px; }

.market-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 750;
}

.market-name h3 { margin: 0; font: inherit; }

.market-sign {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.market-controls { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; }

.status {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.market-switch { display: inline-flex; cursor: pointer; }

.market-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d0d5dd;
  transition: background .16s ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .2);
  content: "";
  transition: transform .16s ease;
}

.market-switch input:checked + .switch-track { background: var(--accent); }
.market-switch input:checked + .switch-track::after { transform: translateX(14px); }

.market-switch input:focus-visible + .switch-track {
  outline: 3px solid #dbe8ff;
  outline-offset: 2px;
}

.market.is-disabled { opacity: .48; filter: saturate(.25); }
.market.is-disabled .status { background: #f2f4f7; color: #667085; }

.market .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.metric .label { display: block; margin-bottom: 1px; }
.metric .value { display: block; margin-top: 3px; color: var(--ink); font-size: 16px; line-height: 1.15; text-align: left; }

.market-foot {
  margin-top: 19px;
  padding-top: 13px;
  border-top: 0;
}

/* Calculation call to action */
.calc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  margin: 2.75rem -24px 0;
  border-radius: 14px;
  overflow: hidden;
  padding: 2rem max(24px, calc((100vw - min(1440px, calc(100vw - 48px))) / 2));
  background:
    radial-gradient(ellipse at 48% 0%, #345d88 0%, transparent 68%),
    linear-gradient(115deg, #142944 0%, #234869 58%, #142943 100%);
  color: #fff;
}

.calc-side,
.calc-copy { padding-inline: 1.5rem; }

.calc-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.calc-side p {
  max-width: none;
  margin: 0;
  color: #c6d0e0;
  font-size: 1rem;
  line-height: 1.5;
}

.calc-side a {
  color: #a9ceff;
  text-decoration-color: rgba(169, 206, 255, .55);
  text-underline-offset: .16em;
}

.calc-side a:hover { color: #fff; }

.calc-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 8.5rem;
  border-inline: 1px solid rgba(184, 194, 214, .24);
  text-align: center;
}

@property --calc-border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.calc-copy .calc-action {
  --calc-border-angle: 0deg;
  position: relative;
  min-height: 3.375rem;
  margin: 0;
  padding-inline: 2.5rem;
  border: 3px solid transparent;
  border-radius: .65rem;
  background:
    linear-gradient(#f8fbff, #f8fbff) padding-box,
    conic-gradient(from var(--calc-border-angle), #cbd5df 0deg, #0964ab 180deg, #cbd5df 360deg) border-box;
  color: #172b46;
  font-size: 1rem;
  font-weight: 650;
  box-shadow: 0 8px 20px rgba(4, 24, 55, .35);
  animation: calc-border-orbit 3s linear infinite;
  transition: transform .25s ease, box-shadow .25s ease;
}

@keyframes calc-border-orbit { to { --calc-border-angle: 360deg; } }

.calc-copy .calc-action:hover {
  box-shadow: 0 12px 26px rgba(4, 24, 55, .5);
  transform: translateY(-2px);
}

.calc-copy .calc-action:active { transform: translateY(0); }

.calc-copy .calc-action:focus-visible {
  outline: 3px solid #d1e4ff;
  outline-offset: 4px;
}

/* Results */
.results { margin-top: 2rem; padding-bottom: 1.5rem; }

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

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

.results-grid.is-loading { align-items: start; }
.results.is-empty .results-heading { visibility: hidden; }
.results.is-empty .results-grid { align-items: center; }

.result-prompt {
  max-width: 34rem;
  margin: 0;
  grid-column: 1 / -1;
  justify-self: center;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.5;
  text-align: center;
}

.result-loading {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  align-self: start;
  justify-self: center;
  min-height: 10rem;
  gap: .625rem;
  color: var(--muted);
  font-size: .9375rem;
}

.result-loading::before {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid #d0d5dd;
  border-top-color: var(--blue);
  border-radius: 50%;
  content: '';
  animation: result-loading-spin .75s linear infinite;
}

@keyframes result-loading-spin { to { transform: rotate(360deg); } }

.result-market {
  --result-accent: var(--blue);
  position: relative;
  padding: 1.25rem;
  overflow: hidden;
  border-radius: .875rem;
}

.result-market::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #d0d5dd;
  content: "";
}

.result-market::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 9.75rem;
  background: var(--result-accent);
  content: "";
}

.result-wb { --result-accent: #8e37e9; }
.result-ozon { --result-accent: #155eef; }
.result-yandex { --result-accent: #e6572e; }

.result-head { gap: .75rem; margin-bottom: 1.125rem; }

.result-state {
  padding: .25rem .5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--result-accent) 10%, #fff);
  color: var(--result-accent);
  font-size: .6875rem;
  font-weight: 750;
  white-space: nowrap;
}

.price-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}

.price-scenario {
  display: grid;
  min-width: 0;
  gap: .25rem;
  padding: .6875rem .625rem;
  border: 1px solid var(--line);
  border-radius: .625rem;
  background: #fafbfc;
}

.price-scenario > span {
  overflow: hidden;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-scenario strong {
  overflow: hidden;
  font-size: 1.125rem;
  letter-spacing: -.35px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-main { border-color: #c7dcff; background: #f4f8ff; }
.scenario-main strong { color: #155eef; }
.scenario-discount { border-color: #f3d2cf; background: #fff7f6; }
.scenario-discount strong { color: #c64f4b; }
.scenario-break { background: #f8fafc; }
.scenario-break strong { color: #475467; }

.unit-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  margin: 1.125rem 0;
  padding: 1rem 0;
  border-block: 1px solid var(--line);
}

.unit-chart figcaption,
.chart-legend { display: none; }

.chart-canvas { display: block; width: 100% !important; height: 13rem !important; }

.chart-track::after {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.chart-segment { display: none; }

.chart-wb .chart-track {
  width: 8.7rem;
  background: conic-gradient(#697586 0 46%, #155eef 46% 71%, #7f56d9 71% 77%, #12b76a 77% 93%, #f79009 93% 100%);
}

.chart-ozon .chart-track {
  width: 9.35rem;
  background: conic-gradient(#697586 0 45%, #155eef 45% 74%, #7f56d9 74% 79%, #12b76a 79% 93%, #f79009 93% 100%);
}

.chart-yandex .chart-track {
  width: 8.45rem;
  background: conic-gradient(#697586 0 46%, #155eef 46% 73%, #7f56d9 73% 78%, #12b76a 78% 92%, #f79009 92% 100%);
}

.cost-groups { display: grid; }
.cost-group { border-bottom: 1px solid var(--line); }

.cost-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.4rem, .9fr) 1rem;
  align-items: center;
  gap: .5rem;
  padding: .8125rem 0;
  color: #344054;
  list-style: none;
  cursor: pointer;
}

.cost-group summary::-webkit-details-marker { display: none; }

.cost-group summary::after {
  width: 1rem;
  height: 1rem;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20d='m4%206%204%204%204-4'%20fill='none'%20stroke='%23667085'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E") center / 1rem 1rem no-repeat;
  content: "";
  transition: transform .16s ease;
}

.cost-group[open] summary { color: var(--ink); }
.cost-group[open] summary::after { transform: rotate(180deg); }

.cost-name {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  overflow: hidden;
  font-size: .875rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-name::before {
  flex: 0 0 .5rem;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #697586;
  content: "";
}

.cost-group:nth-child(1) .cost-name::before { background: #36a2eb; }
.cost-group:nth-child(2) .cost-name::before { background: #ff6384; }
.cost-group:nth-child(3) .cost-name::before { background: #ff9f40; }
.cost-group:nth-child(4) .cost-name::before { background: #ffcd56; }
.cost-group:nth-child(5) .cost-name::before { background: #4bc0c0; }

.cost-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .25rem;
  font-size: .75rem;
  font-weight: 400;
  text-align: right;
  white-space: nowrap;
}

.cost-values > span:first-child { font-weight: 700; }
.cost-values > span:nth-child(2) { color: #c64f4b; }
.cost-values > span:nth-child(3) { color: #667085; }

.cost-items {
  margin: 0 0 .875rem;
  padding: .75rem 1.5rem .75rem .75rem;
  border-radius: .5rem;
  background: #f8fafc;
}

.cost-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.4rem, .9fr);
  gap: .5rem;
  color: #667085;
  font-size: .8125rem;
}

.cost-item + .cost-item { margin-top: .45rem; }
.cost-item > .cost-values { color: #475467; font-weight: 400; }

.result-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.4rem, .9fr) 1rem;
  align-items: center;
  gap: .5rem;
  padding: 1rem 0 .25rem;
  color: #344054;
  font-size: .875rem;
  font-weight: 700;
}

.result-total > span:first-child { padding-left: .95rem; }

.calculation-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  margin: 1.25rem 0 1rem;
  color: #344054;
  text-align: left;
}

.calculation-status[hidden] { display: none; }
.calculation-status.is-reserved > * { visibility: hidden; }

.calculation-status-mark {
  display: grid;
  place-items: center;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #dcfae6;
  color: #087c6b;
}

.calculation-status-mark svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calculation-status-copy p { margin: 0; line-height: 1.45; }
.calculation-status-copy p:first-child { font-size: 1rem; font-weight: 650; }
.calculation-status-copy p:last-child { color: var(--muted); font-size: .875rem; }

/* Footer */
.site-footer {
  margin-top: 2rem;
  background: linear-gradient(125deg, #102b4b 0%, #10253f 54%, #0b1d34 100%);
  color: #dbe7f4;
}

.site-footer-inner { padding: 2.625rem 0 1.5rem; }

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-brand {
  gap: .625rem;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 750;
}

.footer-brand img { width: 2rem; height: 2rem; }
.footer-brand sup { font-weight: 400; }

.site-footer h2 {
  margin: 0 0 .875rem;
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
}

.footer-links {
  display: grid;
  gap: .625rem;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  list-style: none;
}

.footer-copy,
.footer-legal,
.footer-bottom {
  color: #b5c6d9;
  font-size: 1rem;
  line-height: 1.55;
}

.footer-copy { margin: 1rem 0 0; }
.footer-legal { margin: 1.75rem 0 0; }

.site-footer a:not(.footer-brand) {
  color: #a9ceff;
  text-decoration: underline;
  text-decoration-color: rgba(169, 206, 255, .55);
  text-underline-offset: .16em;
}

.site-footer a:not(.footer-brand):hover { color: #fff; }

.site-footer a:not(.footer-brand):focus-visible {
  outline: 2px solid #d1e4ff;
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(218, 232, 247, .18);
  color: #a9bdd2;
}

.footer-bottom p { margin: 0; }

/* Modal dialog and its controls */
html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.modal-layer {
  position: fixed;
  z-index: 1050;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(16, 24, 40, .48);
  transition: opacity .12s linear, visibility 0s linear .12s;
}

.modal-layer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .12s linear;
}

.modal-stack-1 { z-index: 1052; }
.modal-stack-2 { z-index: 1054; }
.modal-stack-3 { z-index: 1056; }
.modal-stack-4 { z-index: 1058; }

.modal-layer,
.modal-panel { overscroll-behavior: contain; }

.modal-panel {
  --modal-radius: 1.125rem;
  display: block;
  width: min(660px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: var(--modal-radius);
  background: var(--surface);
  box-shadow: 0 24px 48px rgba(16, 24, 40, .22);
  clip-path: inset(0 round var(--modal-radius));
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 84, 103, .55) transparent;
  transform: translateY(14px) scale(.975);
  transition: transform .12s cubic-bezier(.2, .8, .2, 1);
}

.modal-layer.is-open .modal-panel { transform: translateY(0) scale(1); }

/* Ozon has a three-column cluster editor, so it needs more working width. */
#modal-ozon .modal-panel { width: min(860px, 100%); }

.modal-panel::-webkit-scrollbar { width: .625rem; }
.modal-panel::-webkit-scrollbar-track { background: transparent; }
.modal-panel::-webkit-scrollbar-thumb {
  border: .1875rem solid transparent;
  border-radius: 999px;
  background: rgba(71, 84, 103, .55);
  background-clip: padding-box;
}
.modal-panel::-webkit-scrollbar-thumb:hover { background-color: rgba(71, 84, 103, .75); }

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.modal-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modal-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.4px; }

.modal-close {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #f2f4f7;
  color: #475467;
  font-size: 0;
  cursor: pointer;
}

.modal-close::before,
.modal-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  content: '';
}
.modal-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.modal-close:hover { background: #eaecf0; }
.modal-lead { margin: 8px 24px 20px; color: var(--muted); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: auto;
  padding: 0 24px 24px;
}

.field {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: .875rem;
  font-weight: 650;
}

.field.full,
.choice.full { grid-column: 1 / -1; }

.field input,
.field select,
.custom-select-trigger {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #dbe8ff;
  outline: 0;
}

.choice {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.choice legend { padding: 0 4px; color: #475467; font-size: .875rem; font-weight: 650; }
.choice label { color: #475467; font-size: .9rem; }
.choice input { accent-color: var(--blue); }

.pair-grid { padding: 0; gap: 14px; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.text-button {
  border: 0;
  background: transparent;
  color: #475467;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
}

.text-button:hover { color: var(--ink); }

/* Form validation */
.field[hidden],
.choice[hidden] { display: none !important; }

.field-invalid,
.field-invalid + .custom-select .custom-select-trigger {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, .12);
}

.field-error {
  margin: .1rem 0 0;
  color: var(--red);
  font-size: .72rem;
  line-height: 1.35;
}

.form-validation {
  display: grid;
  gap: .2rem;
  margin: 1rem 0;
  padding: .875rem 1rem;
  border: 1px solid #fecdca;
  border-radius: .75rem;
  background: #fff6f5;
  color: #b42318;
}

.form-validation strong { font-size: .875rem; }
.form-validation span { font-size: .8rem; }

/* Custom select */
.native-select {
  position: absolute;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.custom-select-trigger:hover { border-color: #98a2b3; }

.custom-select-trigger:focus-visible {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px #dbe8ff;
}

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

.custom-select-chevron {
  display: grid;
  place-items: center;
  flex: 0 0 1rem;
  color: #667085;
  transition: transform .16s ease;
}

.custom-select-chevron svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.custom-select.is-open .custom-select-chevron { transform: rotate(180deg); }

.custom-select-menu {
  position: absolute;
  z-index: 3;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  /* Long warehouse and cluster lists should show several real choices at once. */
  max-height: min(320px, 48vh);
  padding: 5px;
  overflow: auto;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(16, 24, 40, .14);
}

.custom-select.opens-up .custom-select-menu { top: auto; bottom: calc(100% + 5px); }

.custom-select-option {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #344054;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option:focus-visible,
.custom-select-option.is-selected {
  background: #eff4ff;
  color: var(--blue);
}

.custom-select-option:disabled {
  color: #98a2b3;
  cursor: not-allowed;
  opacity: 1;
}

.custom-select-option:focus-visible { outline: 0; }
.custom-select-option.is-selected { font-weight: 700; }

/* Ozon logistics choice */
.logistics-choice { padding: .75rem; }

.logistics-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}

.logistics-option {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: .35rem;
  min-height: 0;
  padding: .625rem;
  border: 1px solid #d0d5dd;
  border-radius: .5rem;
  background: #fff;
  color: #344054;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.logistics-option input { position: absolute; opacity: 0; }

.logistics-option:has(input:checked) {
  border-color: var(--blue);
  background: #eff4ff;
  box-shadow: 0 0 0 1px var(--blue);
}

.logistics-option:has(input:focus-visible) {
  outline: 3px solid #dbe8ff;
  outline-offset: 2px;
}

.logistics-option-title { font-size: .8125rem; font-weight: 700; line-height: 1.25; }
.logistics-option-note { color: #667085; font-size: .6875rem; font-weight: 650; }
.logistics-option-note.recommended { color: var(--green); }

/* Ozon cluster statistics */
.statistics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: -.1rem 0 .75rem;
  color: var(--muted);
  font-size: .8125rem;
}

.statistics-add {
  min-height: 2.25rem;
  padding: .4rem .65rem;
  border-color: var(--blue);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 650;
  white-space: nowrap;
}

.statistics-add:hover { background: #eff4ff; }
.statistics-limit { margin: .625rem 0 0; color: var(--muted); font-size: .75rem; }

.ozon-cluster-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(6rem, .6fr) auto;
  align-items: center;
  column-gap: .5rem;
  padding: .125rem 0;
}
#ozon_cluster_stats { display: grid; gap: .625rem; }
.ozon-cluster-stat-row > .custom-select { min-width: 0; }
.ozon-cluster-stat-row .stat-orders {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .875rem;
  outline: none;
}
.ozon-cluster-stat-row .stat-orders:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #dbe8ff; }
.ozon-cluster-stat-actions { display: flex; align-self: end; gap: .35rem; }
.ozon-cluster-stat-actions .btn { display: grid; place-items: center; min-width: 2.35rem; height: 43px; min-height: 43px; padding: 0 .5rem; }
.stat-action-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ozon-cluster-stat-actions .stat-add { color: #475467; }
.ozon-cluster-stat-actions .stat-remove { color: #d94a4a; }
.ozon-cluster-stat-actions .stat-remove:hover { border-color: #fecdca; background: #fff5f4; color: #c93636; }
.ozon-cluster-stat-actions .stat-remove:disabled { color: var(--muted); cursor: not-allowed; }

/* Responsive layout */
@media (min-width: 561px) {
  .footer-legal-wrap .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
  }
}

@media (min-width: 801px) {
  .site-footer-inner { padding-inline: 1.5rem; }
}

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

@media (max-width: 1050px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-grid { grid-template-columns: 1fr; }
  .calc { grid-template-columns: 1fr; padding-block: 1.25rem; }
  .calc-side { display: none; }
  .calc-copy {
    width: 100%;
    max-width: none;
    min-height: 5.5rem;
    padding: 0;
    border: 0;
    text-align: center;
  }
}

@media (max-width: 800px) {
  .site-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal-wrap { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .results { margin-top: 2rem; }
  .results-heading { align-items: start; flex-direction: column; gap: .5rem; }
  .results-grid { grid-template-columns: 1fr; }
  .price-scenario strong { font-size: 1.25rem; }
  .cost-group summary,
  .result-total { grid-template-columns: minmax(0, 1fr) minmax(9.75rem, .9fr) 1rem; }
  .cost-item { grid-template-columns: minmax(0, 1fr) minmax(9.75rem, .9fr); }
}

@media (max-width: 620px) {
  .shell { width: min(1440px, calc(100% - 28px)); }
  .nav { display: none; }
  .head { align-items: start; flex-direction: column; }
  .head h1 { font-size: 28px; }
  .grid4 { grid-template-columns: 1fr; }
  .calc { margin-inline: 0; padding-inline: 14px; }
  .edit {
    justify-content: center;
    min-height: 2.5rem;
    margin: 0;
    padding: .5rem .75rem;
    border: 1px solid #d0d5dd;
    background: #fff;
    font-size: .875rem;
  }
  .edit:hover { border-color: #98a2b3; background: #f9fafb; }
  .modal-layer { padding: .5rem; }
  .modal-panel { --modal-radius: .5rem; width: 100%; max-height: calc(100dvh - 1rem); box-shadow: 0 12px 28px rgba(16, 24, 40, .2); }
  .modal-kicker { display: none; }
  .modal-head { padding: 1rem 1rem 0; }
  .modal-head h2 { font-size: 1.35rem; }
  .modal-close { width: 2.125rem; height: 2.125rem; border-radius: .5rem; }
  .modal-lead { margin: .45rem 1rem .9rem; font-size: .95rem; line-height: 1.4; }
  .form-grid { grid-template-columns: 1fr; gap: .625rem; padding: 0 1rem 1rem; }
  .field { gap: .25rem; font-size: .8125rem; }
  .field.full,
  .choice.full { grid-column: auto; }
  .field input,
  .field select,
  .custom-select-trigger { height: 2.5rem; padding-inline: .6875rem; border-radius: .5rem; }
  .choice { gap: .5rem; padding: .6875rem; border-radius: .5rem; }
  .modal-foot { padding: .75rem 1rem; }
  .btn { min-height: 2.5rem; padding-inline: .9rem; }
  .logistics-options { grid-template-columns: 1fr; }
  .logistics-option { flex-direction: row; align-items: center; }
  .logistics-option-title { font-size: .875rem; }
  .statistics-head { align-items: stretch; flex-direction: column; gap: .5rem; }
  .statistics-add { width: 100%; }
  .ozon-cluster-stat-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: .5rem; }
  .ozon-cluster-stat-row > .custom-select { grid-column: 1 / -1; }
  .ozon-cluster-stat-row .stat-orders { grid-column: 1; }
  .ozon-cluster-stat-actions { grid-column: 2; grid-row: 3; align-self: center; justify-content: flex-end; }
}

@media (max-width: 560px) {
  .result-market { padding: 1.125rem; }
  .unit-chart { min-height: 11rem; }
  .chart-canvas { height: 11rem !important; }
  .calculation-status { align-items: flex-start; margin-top: 2rem; }
  .calculation-status-copy p:first-child { font-size: .9375rem; }
  .site-footer { margin-top: 1.5rem; }
  .site-footer-inner { padding-top: 2rem; padding-bottom: 1.125rem; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-legal-wrap { grid-column: auto; }
  .footer-legal-wrap .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
  }
  .footer-legal { margin-top: 1.5rem; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: .5rem; }
}

@media (max-width: 390px) {
  .result-market { padding: 1rem; }
  .price-scenarios { gap: .35rem; }
  .price-scenario { padding: .5rem .35rem; }
  .price-scenario strong { font-size: 1.05rem; }
  .chart-wb .chart-track { width: 7.25rem; }
  .chart-ozon .chart-track { width: 7.75rem; }
  .chart-yandex .chart-track { width: 7rem; }
  .unit-chart { min-height: 9.5rem; }
  .cost-group summary,
  .result-total { grid-template-columns: minmax(0, 1fr) minmax(8.5rem, .9fr) .875rem; }
  .cost-group summary::after { width: .875rem; height: .875rem; background-size: .875rem .875rem; }
  .cost-item { grid-template-columns: minmax(0, 1fr) minmax(8.5rem, .9fr); }
  .cost-items { padding-right: 1.375rem; }
  .cost-values,
  .cost-item > .cost-values { font-size: .6875rem; }
}

@media (max-width: 360px) {
  .modal-layer { padding: .375rem; }
  .modal-head { padding: .875rem .875rem 0; }
  .modal-lead { margin-inline: .875rem; }
  .form-grid { padding-inline: .875rem; }
  .modal-foot { padding-inline: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .actions .btn.is-demo-attention { animation: none; }
  .calc-copy .calc-action { animation: none; transition: none; }
  .result-loading::before { animation: none; }
}
