/* Account / OAuth / horses chip — mk terracotta/blue */

.kk-oauth {
  max-width: 420px;
}

.kk-oauth__lead {
  margin: 0 0 1rem;
  color: var(--mk-muted, #5c6480);
}

.kk-oauth__btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kk-oauth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--mk-radius-sm, 14px);
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.kk-oauth__btn--vk {
  background: #0077ff;
  color: #fff;
}

.kk-oauth__btn--vk:hover {
  background: #0066dd;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.18);
}

.kk-oauth__btn--ya {
  background: #fc3f1d;
  color: #fff;
}

.kk-oauth__btn--ya:hover {
  background: #e03516;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(252, 63, 29, 0.18);
}

.kk-account__balance {
  margin: 0 0 1rem;
}

.kk-account__balance-num {
  display: inline-block;
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--mk-royal, #223382);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--mk-orange-soft, rgba(249, 133, 19, 0.14));
  border: 1.5px solid rgba(249, 133, 19, 0.35);
}

.kk-account__prices {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  color: var(--mk-muted, #5c6480);
}

.kk-account__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.kk-account__logout {
  color: var(--mk-muted, #5c6480);
  font-size: 0.95rem;
}

.kk-account__logout:hover {
  color: var(--mk-orange, #f98513);
}

.kk-account__error {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--mk-radius-sm, 14px);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.2);
}

.kk-account__empty {
  color: var(--mk-muted, #5c6480);
}

.kk-account__table-wrap {
  overflow-x: auto;
  border-radius: var(--mk-radius-sm, 14px);
  border: 1px solid var(--mk-border, rgba(34, 51, 130, 0.12));
  background: #fff;
}

.kk-account__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.kk-account__table th,
.kk-account__table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--mk-border, rgba(34, 51, 130, 0.1));
  vertical-align: top;
}

.kk-account__table th {
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 700;
  color: var(--mk-royal, #223382);
  background: var(--mk-azure-soft, #dfe5f3);
}

.kk-account__table tr:last-child td {
  border-bottom: 0;
}

.kk-account__delta.is-credit {
  color: #0f7b3a;
  font-weight: 700;
}

.kk-account__delta.is-debit {
  color: #b42318;
  font-weight: 700;
}

/* Legacy tool gate (superseded by .kk-tool-card in tool-form.css) */
.kk-tool-gate {
  display: none;
}

/* Header chip */
.kk-horses-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  margin-right: 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--mk-royal, #223382);
  background: rgba(184, 97, 47, 0.1);
  border: 1.5px solid rgba(184, 97, 47, 0.35);
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease;
}

.kk-horses-chip:hover {
  background: rgba(184, 97, 47, 0.18);
  border-color: #b8612f;
  color: var(--mk-royal, #223382);
}

.kk-horses-chip__icon {
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .kk-horses-chip {
    margin-right: 0;
    font-size: 0.82rem;
  }
}


.kk-header-account {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.kk-header-account--guest {
  color: var(--mk-royal, #223382);
  background: #fff;
  border: 1.5px solid rgba(34, 51, 130, 0.22);
}

.kk-header-account--guest:hover {
  border-color: var(--mk-terracotta, #B8612F);
  color: var(--mk-terracotta, #B8612F);
}

.kk-header-account--user {
  color: var(--mk-royal, #223382);
  background: var(--mk-orange-soft, rgba(184, 97, 47, 0.12));
  border: 1.5px solid rgba(184, 97, 47, 0.35);
}

.kk-header-account--user:hover {
  border-color: var(--mk-terracotta, #B8612F);
  color: var(--mk-terracotta, #B8612F);
}

.kk-header-account__bal {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.kk-header-account__name {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .kk-header-account__name {
    max-width: 5rem;
  }
}


.kk-header-account-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.kk-header-logout {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--mk-muted, #5c6480);
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.kk-header-logout:hover {
  color: var(--mk-terracotta, #B8612F);
  border-color: rgba(184, 97, 47, 0.35);
  background: #fff;
}


/* Horse packages showcase (ЛК) */
.kk-pack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.kk-pack__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.35rem 1rem 1.15rem;
  border-radius: var(--mk-radius-sm, 14px);
  background: #fff;
  border: 1.5px solid var(--mk-border, rgba(34, 51, 130, 0.12));
  box-shadow: 0 8px 24px rgba(34, 51, 130, 0.06);
  text-align: center;
}

.kk-pack__card--badge {
  border-color: rgba(184, 97, 47, 0.45);
  box-shadow: 0 10px 28px rgba(184, 97, 47, 0.12);
}

.kk-pack__badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--mk-terracotta, #B8612F);
}

.kk-pack__amount {
  margin: 0.35rem 0 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 800;
  font-size: clamp(1.55rem, 2.8vw, 1.95rem);
  color: var(--mk-royal, #223382);
  line-height: 1;
}

.kk-pack__icon {
  font-size: 1.15em;
  line-height: 1;
  color: var(--mk-terracotta, #B8612F);
}

.kk-pack__price {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--mk-muted, #5c6480);
}

.kk-pack__btn {
  margin-top: 0.35rem;
  width: 100%;
  max-width: 11rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(34, 51, 130, 0.18);
  background: var(--mk-azure-soft, #dfe5f3);
  color: var(--mk-royal, #223382);
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: not-allowed;
  opacity: 0.85;
}

.kk-pack__btn[disabled],
.kk-pack__btn[aria-disabled="true"] {
  pointer-events: none;
}

.kk-account__shop-link {
  margin-left: 0.35rem;
  font-weight: 700;
  color: var(--mk-terracotta, #B8612F);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kk-account__shop-link:hover {
  color: var(--mk-royal, #223382);
}

.kk-account__orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.kk-account__order {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: var(--mk-radius-sm, 14px);
  background: #fff;
  border: 1px solid var(--mk-border, rgba(34, 51, 130, 0.12));
  font-size: 0.95rem;
}

.kk-account__order-title {
  font-weight: 700;
  color: var(--mk-royal, #223382);
}

.kk-account__order-date,
.kk-account__order-status {
  color: var(--mk-muted, #5c6480);
  white-space: nowrap;
}

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

  .kk-account__order {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}


.kk-account__horses {
  display: grid;
  grid-template-columns: minmax(12rem, 0.9fr) minmax(0, 1.6fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.kk-account__horses .kk-pack {
  gap: 0.75rem;
}

.kk-account__horses .kk-pack__card {
  padding: 1rem 0.75rem 0.9rem;
  gap: 0.4rem;
}

.kk-account__horses .kk-pack__amount {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}

.kk-account__horses .kk-pack__price {
  font-size: 0.95rem;
}

.kk-account__horses .kk-pack__btn {
  margin-top: 0.15rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  max-width: none;
}

.kk-account__horses .kk-pack__badge {
  top: 0.45rem;
  right: 0.45rem;
  font-size: 0.65rem;
  padding: 0.12rem 0.45rem;
}

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

/* Header account only (no discuss CTA) */
.site-header__cta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

@media (max-width: 767px) {
  /* Keep login/account visible; profile before burger */
  .site-header__inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .site-logo {
    order: 1;
    min-width: 0;
  }
  .site-header__cta {
    display: flex !important;
    order: 2;
    margin-left: auto;
    max-width: min(48vw, 12.5rem);
  }
  .site-nav-toggle {
    order: 3;
    margin-left: 0 !important;
  }
  .kk-header-account-wrap {
    max-width: 100%;
  }
  .kk-header-account {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
    max-width: 100%;
  }
  .kk-header-account__name {
    max-width: 4.2rem;
  }
  .kk-header-logout {
    padding: 0.3rem 0.45rem;
    font-size: 0.75rem;
  }
}

/* Profile dropdown */
.kk-header-account-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.kk-header-account--user {
  cursor: pointer;
  border: 1.5px solid rgba(184, 97, 47, 0.35);
  background: var(--mk-orange-soft, rgba(184, 97, 47, 0.12));
  font: inherit;
}

.kk-header-account-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(34, 51, 130, 0.14);
  box-shadow: 0 12px 28px rgba(34, 51, 130, 0.12);
  z-index: 1200;
}

.kk-header-account-menu__item {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--mk-royal, #223382);
  font-family: var(--mk-font-display, Manrope, system-ui, sans-serif);
  font-weight: 600;
  font-size: 0.9rem;
}

.kk-header-account-menu__item:hover {
  background: rgba(184, 97, 47, 0.1);
  color: var(--mk-terracotta, #B8612F);
}

.kk-header-account-menu__item--logout {
  color: var(--mk-muted, #5c6480);
  font-weight: 500;
}

/* Logo: keep one line on narrow screens */
body.mk-shell .site-logo,
.site-logo {
  flex-wrap: nowrap !important;
  white-space: nowrap;
  min-width: 0;
  max-width: 42vw;
}

body.mk-shell .site-logo__text,
.site-logo__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mk-shell .site-logo__braces,
.site-logo__braces {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .kk-header-logout { display: none !important; }
  body.mk-shell .site-logo__text,
  .site-logo__text {
    font-size: 0.92rem;
  }
  .kk-header-account__name {
    max-width: 3.6rem;
  }
}

/* tools hub categories */
.mk-page--tools .mk-section + .mk-section { padding-top: 2.5rem; }
.mk-page--tools #tools-text,
.mk-page--tools #tools-images,
.mk-page--tools #tools-video,
.mk-page--tools #tools-audio,
.mk-page--tools #tools-business { scroll-margin-top: 5rem; }

.kk-account__admin-section .kk-account__admin-cta {
  margin: 0;
}
.kk-account__admin-cta .kodkonem-btn {
  display: inline-flex;
}
