/* Kontext site extensions: cabinets, exchange, products, mobile nav, motion */

:root {
  --header-bg: rgba(5, 5, 7, 0.86);
  --nav: #c4c4c8;
  --hairline: rgba(255, 255, 255, 0.09);
  --fill: rgba(255, 255, 255, 0.05);
  --panel-light: #131319;
}

html[data-theme="light"] {
  --header-bg: rgba(244, 240, 230, 0.92);
  --nav: #6a675f;
  --hairline: rgba(22, 22, 22, 0.1);
  --fill: rgba(22, 22, 22, 0.04);
}

.site-header {
  background: var(--header-bg);
}

.cabinet-link,
.browser-button,
.lang-switch {
  transition: color 0.2s ease, transform 0.15s ease;
}

.cabinet-link:hover,
.browser-button:hover {
  color: var(--white);
}

.primary-button,
.link-button {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-button:active,
.link-button:active {
  transform: scale(0.97);
}

/* Mobile: horizontal nav like desktop */
@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    min-height: 70px;
    padding-bottom: 10px;
    gap: 0;
  }

  .desktop-nav {
    position: static;
    order: 3;
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    padding: 10px 0 2px;
    gap: clamp(16px, 4vw, 24px);
    border: 0;
    background: transparent;
    scrollbar-width: none;
  }

  .desktop-nav::-webkit-scrollbar {
    display: none;
  }

  body.nav-open .desktop-nav {
    display: flex;
  }

  .desktop-nav a,
  .nav-search {
    width: auto;
    padding: 0;
    white-space: nowrap;
    font-size: 14px;
  }

  .menu-button {
    display: none;
  }

  .browser-button {
    display: flex;
  }

  .brand-name {
    display: block;
  }
}

/* Account cabinet */
.lk-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 4.2vw 80px;
}

.lk-hero h1 {
  margin: 12px 0 8px;
  font-family: Manrope, sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.05em;
}

.lk-hello {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  animation: fade-up 0.45s ease;
}

.lk-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.2fr 0.8fr;
}

.lk-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.lk-panel.is-quiet {
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.lk-panel h2 {
  margin: 10px 0 14px;
  font-family: Manrope, sans-serif;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.lk-panel label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.lk-panel input,
.lk-panel select,
.lk-panel textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--white);
  background: var(--black);
}

.lk-panel button[type="submit"] {
  margin-top: 20px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--red);
  font-weight: 600;
  cursor: pointer;
}

.lk-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.lk-plans form {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.lk-brief {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}

.lk-prompt {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--black);
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}

.lk-ok {
  color: var(--green);
}

/* Boost auth / cabinet */
.boost-auth {
  display: grid;
  min-height: 60vh;
  place-items: center;
  padding: 100px 4.2vw 80px;
}

.boost-card {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  animation: fade-up 0.4s ease;
}

.boost-card label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.boost-card input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--black);
  color: var(--white);
}

.boost-card button[type="submit"] {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.boost-error {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--red) 18%, transparent);
  color: #ff8a84;
  font-size: 13px;
}

.boost-switch {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.boost-logout {
  padding: 40px 4.2vw 80px;
  text-align: center;
}

/* Product landings */
.product-land {
  padding-bottom: 80px;
}

.product-screen {
  display: grid;
  gap: 40px;
  align-items: center;
  padding: 100px 4.2vw 48px;
  grid-template-columns: 1fr 1fr;
}

.product-screen.is-wide {
  max-width: 1240px;
  margin: 0 auto;
}

.product-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: lowercase;
}

.product-features {
  display: grid;
  gap: 16px;
  padding: 0 4.2vw 48px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.product-features article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.product-features article:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--white) 15%, var(--line));
}

.product-fallback {
  display: grid;
  min-height: 280px;
  place-items: center;
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
  font-family: Manrope, sans-serif;
  font-size: 48px;
}

/* Exchange */
.exchange-page {
  padding-bottom: 80px;
}

.exchange-hero {
  padding: 100px 4.2vw 48px;
  max-width: 720px;
}

.exchange-updated {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.exchange-tickers {
  padding: 0 4.2vw 64px;
}

.exchange-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.exchange-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.exchange-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.exchange-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.exchange-icon-fallback {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--fill);
  font-family: Manrope, sans-serif;
  font-weight: 800;
}

.exchange-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.exchange-symbol {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.exchange-price {
  font-family: Manrope, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  transition: color 0.2s ease;
}

.exchange-price.tick {
  color: var(--red);
}

.exchange-change {
  font-size: 12px;
  font-weight: 600;
}

.exchange-card.is-up .exchange-change {
  color: #3ecf8e;
}

.exchange-card.is-down .exchange-change {
  color: var(--red);
}

.exchange-soon {
  margin: 0 4.2vw;
  padding-top: 40px;
  max-width: 720px;
}

.exchange-roadmap {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.exchange-roadmap li {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  animation: slide-in 0.5s ease backwards;
}

.exchange-roadmap li:nth-child(2) {
  animation-delay: 0.08s;
}

.exchange-roadmap li:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 860px) {
  .lk-grid,
  .lk-fields,
  .product-screen {
    grid-template-columns: 1fr;
  }

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

/* ——— Homepage layout (restores styles lost from deploy mismatch) ——— */

.home-jump {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 5vw 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.home-jump::-webkit-scrollbar {
  display: none;
}

.home-jump a {
  flex: 0 0 auto;
  color: var(--nav);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
  white-space: nowrap;
}

.home-jump a:hover {
  color: var(--white);
}

.manifesto {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 5vw 28px;
}

.manifesto h1 {
  max-width: 920px;
  margin: 14px 0 20px;
  font-family: Manrope, sans-serif;
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.manifesto h1 em {
  color: var(--red);
  font-style: normal;
}

.manifesto > p {
  max-width: 640px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.manifesto-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.manifesto-pills span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.news-section.is-home-first {
  padding-top: 48px;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.category-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.category-row a:hover {
  border-color: color-mix(in srgb, var(--white) 20%, var(--line));
  background: var(--fill);
}

.category-row b {
  color: var(--red);
  font-weight: 700;
}

.feed-empty {
  padding: 40px 0 20px;
  max-width: 520px;
}

.feed-empty h3 {
  margin: 0 0 12px;
  font-family: Manrope, sans-serif;
  font-size: 28px;
}

.feed-empty p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.feed-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}

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

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

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.link-button:hover {
  border-color: color-mix(in srgb, var(--white) 22%, var(--line));
}

.link-button.is-solid {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.link-button.is-solid:hover {
  filter: brightness(1.05);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* News cards — new template with optional cover */
a.news-card {
  display: block;
  min-height: unset;
  padding: 0;
  border-radius: 18px;
  text-decoration: none;
}

a.news-card.has-cover {
  display: grid;
}

.news-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--panel-light, var(--panel));
}

.news-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 7, 0.72), transparent 55%);
  pointer-events: none;
}

.news-card-body {
  position: relative;
  padding: 22px 24px 30px;
}

a.news-card:not(.has-cover) .news-card-body {
  min-height: 140px;
}

.news-card-body h3 {
  margin: 12px 0 8px;
}

.news-card-body p {
  margin: 0;
}

.news-card-body .card-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.lead-story.has-cover .cover-image {
  opacity: 0.45;
}

.lead-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(5, 5, 7, 0.85), transparent 50%);
  pointer-events: none;
}

.native-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 5vw;
  border-top: 1px solid var(--line);
}

.native-strip a {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.native-strip a:hover {
  border-color: var(--red);
  background: var(--fill);
}

.evening-teaser {
  display: grid;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 5vw 80px;
  grid-template-columns: 1.2fr 0.8fr;
  border-top: 1px solid var(--line);
}

.evening-teaser-copy {
  display: grid;
  gap: 20px;
  grid-template-columns: 140px 1fr;
  align-items: start;
}

.evening-teaser-cover {
  display: block;
  border-radius: 16px;
  overflow: hidden;
}

.evening-teaser-list {
  display: grid;
  gap: 8px;
}

.product-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  font-size: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-line:hover {
  border-color: color-mix(in srgb, var(--white) 18%, var(--line));
  transform: translateX(4px);
}

.product-line b {
  font-weight: 600;
}

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

.products-teaser {
  display: grid;
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 5vw;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.products-teaser h2 {
  margin: 12px 0 16px;
  font-family: Manrope, sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.05em;
}

.products-teaser h2 em {
  color: var(--red);
  font-style: normal;
}

.products-list {
  display: grid;
  gap: 8px;
}

.product-line.is-live {
  border-color: color-mix(in srgb, var(--red) 40%, var(--line));
}

.theme-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

html[data-theme="light"] .theme-icon-moon,
html:not([data-theme="light"]) .theme-icon-sun {
  display: none;
}

.lang-switch {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.browser-button {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
}

.nav-search {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

@media (max-width: 900px) {
  .evening-teaser,
  .products-teaser {
    grid-template-columns: 1fr;
  }

  .evening-teaser-copy {
    grid-template-columns: 1fr;
  }
}

/* Header: nav gets its own full-width row before it starts clipping items */
@media (max-width: 1180px) {
  .site-header {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 10px;
  }
  .desktop-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
  }
  .header-actions {
    margin-left: auto;
  }
}

/* Active language */
.lang-switch.is-active {
  color: var(--ink);
  border-color: var(--red);
}

/* Phones: keep header actions on one row */
@media (max-width: 640px) {
  .header-actions .browser-button,
  .header-actions .telegram-button {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
}

/* Telegram sign-in */
.tg-login { margin-top: 18px; }
.boost-card .tg-login-button,
.tg-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border: 0;
  border-radius: 999px;
  background: #2aabee;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.tg-login .tg-login-button { margin-top: 0; }
.tg-login-button:hover { filter: brightness(1.08); }
.tg-login-button:active { transform: scale(0.98); }
.tg-login-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}
.tg-login-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 4px;
  font-size: 12px;
  color: var(--muted);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.tg-wait-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}
.tg-wait-status.is-error { color: var(--red); }
.tg-wait-status.is-error .tg-wait-dot { display: none; }
.tg-wait-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2aabee;
  animation: tg-pulse 1.2s ease-in-out infinite;
}
@keyframes tg-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .tg-wait-dot { animation: none; }
}

/* feed categories: tappable chips */
.lk-cats { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.lk-cats legend { width: 100%; margin-bottom: 8px; font-size: .85rem; opacity: .75; }
.lk-cat { position: relative; cursor: pointer; }
.lk-cat input { position: absolute; opacity: 0; pointer-events: none; }
.lk-cat span { display: inline-block; padding: 8px 14px; border: 1px solid currentColor; border-radius: 999px; opacity: .6; transition: opacity .15s, background .15s; }
.lk-cat input:checked + span { opacity: 1; background: #ff3028; border-color: #ff3028; color: #fff; }
.lk-cat input:focus-visible + span { outline: 2px solid #ff3028; outline-offset: 2px; }

.lk-cats.is-static { margin-bottom: 10px; }
.lk-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #ff3028; color: #fff; font-size: .85rem; }
.lk-feed-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.lk-feed-actions form { margin: 0; }

/* feed options as a list */
.lk-options, .lk-summary { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.lk-options li { display: grid; grid-template-columns: minmax(140px, 1fr) 3fr; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid rgba(127,127,127,.2); }
.lk-opt-label { padding-top: 8px; font-size: .9rem; opacity: .8; }
.lk-options .lk-cat span { padding: 7px 13px; font-size: .9rem; }
.lk-options .lk-fixed { padding-top: 8px; }
.lk-fixed { font-size: .9rem; }
.lk-summary li { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.lk-summary span { opacity: .7; }
@media (max-width: 560px) {
  .lk-options li { grid-template-columns: 1fr; gap: 6px; }
}

/* ---- Phones & small tablets: compact header, safe tap targets ---- */
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; row-gap: 6px; padding-top: max(10px, env(safe-area-inset-top)); }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand-name { font-size: 18px; }
  .brand-logo { width: 32px; height: 32px; }
  .header-actions { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
  .header-actions .search-button,
  .header-actions .theme-toggle,
  .header-actions .lang-switch { width: 36px; height: 36px; min-width: 36px; padding: 0; font-size: 12px; }
  .header-actions .cabinet-link { padding: 8px 12px; font-size: 13px; }
  /* nav strip scrolls sideways; fade hints there is more */
  .desktop-nav {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
            mask-image: linear-gradient(90deg, #000 85%, transparent);
    padding-right: 24px;
  }
  .desktop-nav a, .nav-search { padding: 8px 0; }
  .hero h1 { font-size: clamp(34px, 10vw, 46px); line-height: 1.05; }
  .hero-copy { font-size: 16px; }
  /* account page */
  .lk-grid { grid-template-columns: 1fr !important; }
  .lk-panel { padding: 18px; }
  .lk-plans { grid-template-columns: 1fr !important; }
  .lk-cat span { padding: 10px 14px; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
}
/* tablets */
@media (min-width: 641px) and (max-width: 1024px) {
  .lk-grid { grid-template-columns: 1fr !important; }
  .roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* no hover-only affordances on touch screens */
@media (hover: none) {
  .lk-cat span, .link-button, button { min-height: 44px; }
}
@media (max-width: 640px) {
  .section-heading { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-heading > p { max-width: none; }
  .section-heading > p br { display: none; }
}

/* Text pages (about, support): label above, heading, then lead — no squeezed row */
.text-page .page-head { display: block; max-width: 860px; }
.text-page .page-head .section-index { display: block; margin-bottom: 14px; }
.text-page .page-head h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; margin-bottom: 18px; }
.text-page .page-head h1 br { display: none; }
.text-page .page-head h1 em { display: block; }
.text-page .page-lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 40em; }
/* products: hero without the decorative circle */
.product-hero { min-height: 0; padding-bottom: 32px; }
.accelerator { grid-template-columns: 1fr !important; }

/* ---------- Kontext VIP ---------- */
.vip-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.vip-badge.is-vip { border: 1px solid var(--line); color: var(--muted); font-weight: 700; }
/* rubric colours: analysis — purple, digests/reviews — green */
.vip-badge.is-take { color: #a78bfa; background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .5); font-weight: 800; }
.vip-badge.is-digest { color: #34d399; background: rgba(16, 185, 129, .13); border: 1px solid rgba(16, 185, 129, .5); font-weight: 800; }
html[data-theme="light"] .vip-badge.is-take { color: #6d28d9; }
html[data-theme="light"] .vip-badge.is-digest { color: #047857; }
.vip-badge.is-public { border: 1px solid var(--line); color: var(--muted); }
.vip-page { max-width: 980px; margin: 0 auto; }
.vip-head h1 em { display: block; }
.vip-paywall { margin: 8px 0 28px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; }
.vip-paywall h2 { font-family: var(--display); letter-spacing: -0.03em; margin: 8px 0 14px; }
.vip-perks { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.vip-filters { display: grid; gap: 12px; margin: 0 0 26px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.vip-filter-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.vip-filter-label { padding-top: 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: inherit; text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: currentColor; }
.chip.is-on { background: #ff3028; border-color: #ff3028; color: #fff; }
.vip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vip-item { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.vip-item.is-vip { border-color: var(--line); }
.vip-item-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.vip-item-title { display: block; font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.vip-item p { margin: 0; color: var(--muted); line-height: 1.55; }
.vip-fav { margin-top: 10px; }
.vip-fav button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.vip-body h2 { font-family: var(--display); letter-spacing: -0.03em; margin: 28px 0 8px; font-size: 22px; }
.vip-sources { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.vip-sources h2 { font-size: 15px; }
.vip-sources ul { padding-left: 18px; color: var(--muted); }
.vip-locked { padding: 18px; border-radius: 16px; background: var(--paper); border: 1px dashed var(--line); margin-bottom: 18px; }
.vip-strip { margin: 28px 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.vip-strip-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.vip-strip-head h3 { margin: 0; font-size: 18px; }
.vip-strip-head a { margin-left: auto; font-size: 13px; color: var(--muted); }
.vip-strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vip-strip li a { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--paper); height: 100%; }
.vip-strip small { color: var(--muted); font-size: 12px; }
.vip-strip span { color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (max-width: 760px) {
  .vip-filter-row { grid-template-columns: 1fr; gap: 6px; }
  .vip-filter-label { padding-top: 0; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .vip-strip ul { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
}


.lk-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.lk-hint { font-size: 12px; color: var(--muted); }
.vip-take { display: grid; gap: 6px; color: inherit; }
.vip-take span:not(.vip-badge) { color: var(--muted); }

/* admin VIP */
.vip-admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.vip-admin-tabs a { padding: 6px 12px; border: 1px solid rgba(127,127,127,.35); border-radius: 999px; font-size: 13px; }
.vip-admin-tabs a.is-active { border-color: #e2231a; }
.vip-admin-generate { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.vip-admin-form { display: grid; gap: 12px; }
.vip-admin-form label { display: grid; gap: 4px; font-size: 13px; }
.vip-admin-form input, .vip-admin-form textarea { width: 100%; font: inherit; box-sizing: border-box; }
.vip-admin-form label.check { display: flex; align-items: center; gap: 6px; }
.vip-admin-form label.check input { width: auto; }
.vip-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vip-admin-actions .is-primary { background: #e2231a; color: #fff; }
.vip-admin-actions .is-danger { border-color: #e2231a; }
.stats-list { max-width: 640px; }
.stats-table-wrap { overflow-x: auto; }
.stats-table { border-collapse: collapse; font-size: 13px; min-width: 620px; }
.stats-table th, .stats-table td { padding: 6px 10px; border-bottom: 1px solid rgba(127,127,127,.25); text-align: left; }

/* Kontext+ page */
.plus-list, .plus-faq { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.plus-list li, .plus-faq li { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.plus-list span, .plus-faq span { color: var(--muted); line-height: 1.5; }
.plus-plans { margin: 36px 0; }
.plus-status { margin-top: 14px; }

/* explainers page head: label above, heading flush left (same as text pages) */
.vip-head { display: block; max-width: 860px; }
.vip-head .section-index { display: block; margin-bottom: 14px; }
.vip-head h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.04; margin: 0 0 14px; padding: 0; text-indent: 0; }
.vip-head h1 em { display: block; }
/* account: checkbox sits next to its label */
.lk-panel label.check { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: .9rem; cursor: pointer; }
.lk-panel label.check input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: #ff3028; }
/* account chips wrap into rows (the explainers page scrolls sideways instead) */
.lk-options .chip-row, .lk-cats { flex-wrap: wrap !important; overflow: visible !important; margin-right: 0 !important; padding-right: 0 !important; }
.lk-cat span { white-space: nowrap; }
.lk-panel .lk-cat { display: inline-block; margin: 0; }
.lk-cat span { line-height: 1.25; }
.lk-cats, .lk-options .chip-row { gap: 8px !important; }

/* what the explainers section is */
.vip-explain { margin: 0 0 22px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; }
.vip-explain summary { cursor: pointer; font-weight: 700; }
.vip-explain ul { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.vip-explain li { display: grid; gap: 3px; }
.vip-explain li span { color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (max-width: 640px) { .vip-explain ul { grid-template-columns: 1fr; } }
/* favourites */
.lk-favs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lk-favs li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(127,127,127,.18); font-size: 14px; }
.lk-favs li a { flex: 1; line-height: 1.4; }
.lk-favs form { margin: 0; }
.lk-favs button { margin: 0 !important; padding: 0 6px !important; background: none !important; color: var(--muted) !important; font-size: 18px; line-height: 1; border: 0; cursor: pointer; }
.fav-open { margin-left: 12px; font-size: 13px; color: var(--muted); }
p.vip-fav a { color: inherit; }

.leisure-jump { margin-top: 18px; }
/* film / music cards: never one huge poster per row on tablets and phones */
.viral-grid, .viral-grid.is-month { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important; }
@media (max-width: 560px) {
  .viral-grid, .viral-grid.is-month { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .viral-card-body { padding: 10px 12px 14px; }
  .viral-card-body h3 { font-size: 16px; }
  .viral-card-body p { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* admin: site traffic */
.visit-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 8px 0 26px; overflow-x: auto; }
.visit-bar { position: relative; flex: 1 0 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.visit-bar i { display: block; width: 100%; min-height: 2px; background: #e5322d; border-radius: 4px 4px 0 0; }
.visit-bar b { position: absolute; top: -4px; font-size: 11px; font-weight: 600; opacity: .8; }
.visit-bar small { position: absolute; bottom: -20px; font-size: 11px; opacity: .6; white-space: nowrap; }
.visit-bars.is-hours { height: 110px; gap: 3px; }
.visit-bars.is-hours .visit-bar { flex-basis: 14px; }
.visit-bars.is-hours .visit-bar i { background: rgba(229, 50, 45, .7); }
.visit-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.visit-cols td:last-child { text-align: right; width: 60px; }
.visit-cols td a { word-break: break-all; }

/* footer legal block, suggest note, age mark, Kontext+ support card */
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.footer-legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--text, inherit); }
.footer-legal p { margin: 0; max-width: 760px; }
.age-mark { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 800; }
.suggest-note { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }
.suggest-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.support-plus-row { margin-bottom: 18px; }
.support-card.is-plus { border: 1px solid rgba(139, 92, 246, .5); background: rgba(139, 92, 246, .08); }
.legal-page .text-block p { max-width: 760px; }
.suggest-card .suggest-note, .suggest-card .suggest-note a { color: rgba(255, 255, 255, .92); }
