/* =========================================================================
   BizLever — "B+ light premium" design system, applied SITE-WIDE.
   Layered on top of theme.css. Display: Unbounded · Body: Golos Text.
   Accent stays the brand blue (--blue / #3463f6) for continuity.
   ========================================================================= */

:root {
  --bp-display: "Unbounded", system-ui, sans-serif;
  --bp-body: "Golos Text", system-ui, sans-serif;
  --bp-accent-tint: #eaf0ff;
  --bp-card-shadow: 0 26px 50px -36px rgba(28, 45, 110, 0.42);
  --bp-card-shadow-hover: 0 36px 60px -34px rgba(28, 45, 110, 0.5);
  --bp-radius: 18px;
  /* shared tokens also used outside the homepage (e.g. 404) */
  --card: #ffffff;
  --ink-soft: #4a4f59;
}

/* ------------------------------------------------------------ Base */
body {
  font-family: var(--bp-body);
  background:
    radial-gradient(120% 60% at 90% -8%, #e3ecff 0%, transparent 38%),
    radial-gradient(90% 60% at 0% -6%, #eef2ff 0%, transparent 40%),
    #f5f6f9;
  background-repeat: no-repeat;
}

h1, h2, h3, .brand {
  font-family: var(--bp-display);
  letter-spacing: -0.01em;
}

/* Long-form reading stays in the body font for legibility */
.article-text h2,
.article-text h3,
.article-text h4 {
  font-family: var(--bp-body);
  letter-spacing: 0;
  font-weight: 700;
}

/* ----------------------------------------------------------- Buttons */
.primary-button,
.ghost-button,
.icon-button,
.action-pill,
.header-submit-button,
.comment-submit,
.next-steps + * .primary-button {
  border-radius: 999px;
}

.primary-button {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 14px 30px -14px rgba(52, 99, 246, 0.6);
  transition: transform 0.16s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover { background: var(--blue-dark); transform: translateY(-2px); }

.ghost-button {
  border-radius: 999px;
  transition: transform 0.16s ease, border-color 0.18s ease, color 0.18s ease;
}

.ghost-button:hover { transform: translateY(-2px); }

/* --------------------------------------------------- Premium surfaces */
.hero,
.stories,
.articles-panel,
.side-card,
.promo-card,
.full-article,
.form-section,
.publish-hero,
.archive-hero,
.search-panel-wrap {
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-card-shadow);
}

.side-card,
.promo-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* --------------------------------------------------------- Tags / pills */
.tag,
.soft-label {
  background: var(--bp-accent-tint);
  color: var(--blue-dark);
  font-family: var(--bp-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------- Header */
.site-header {
  background: rgba(245, 246, 249, 0.82);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 800; }

.header-search { border-radius: 999px; background: #fff; }
.header-search input { font-family: var(--bp-body); }
.header-search .search-submit { border-radius: 999px; min-width: 38px; padding: 0 9px; }
.header-search .search-submit svg { width: 17px; height: 17px; display: block; }

.desktop-nav { font-family: var(--bp-body); }

/* --------------------------------------------------------------- Footer */
.footer {
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-card-shadow);
}

.footer-column strong,
.footer-brand .brand,
.newsletter strong {
  font-family: var(--bp-display);
}

.newsletter button.primary-button { border-radius: 999px; }

/* -------------------------------------------------- Archive / listing */
.article-card {
  padding: 18px;
  border-bottom: 0;
  border: 1px solid var(--line);
  border-radius: var(--bp-radius);
  background: #fff;
  box-shadow: var(--bp-card-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.article-card + .article-card { margin-top: 16px; }

.article-card:hover {
  transform: translateY(-3px);
  border-color: #cfdaf6;
  box-shadow: var(--bp-card-shadow-hover);
}

.article-image { border-radius: 12px; }

/* List/card titles stay in the body face for scannability; the display
   face is reserved for hero, page titles and section heads. */
.article-body h3 { font-family: var(--bp-body); font-weight: 700; letter-spacing: 0; line-height: 1.3; }

.article-engagement {
  color: #667085;
  font-family: var(--bp-body);
}

/* Filter / sort chips → pills */
.format-filter a,
.sort-filter a,
.home-tabs button {
  border-radius: 999px;
  font-family: var(--bp-body);
}

.format-filter a.active,
.sort-filter a.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(52, 99, 246, 0.7);
}

/* ------------------------------------------------------- Author cards */
.author-card button { border-radius: 999px; padding: 6px 14px; }

.detail-author { border-radius: 14px; background: var(--bp-accent-tint); border-color: #d6e0fb; }

/* ----------------------------------------------------------- Avatars */
.avatar-placeholder {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
}

/* -------------------------------------------------------- Article page */
.article-cover { border-radius: 16px; }
.article-actions .action-pill { border-radius: 999px; }

/* Reaction icons → crisp inline SVG (inherit each control's accent colour) */
.article-actions .action-icon svg {
  display: block;
}

/* Active (already-reacted) state */
.article-actions .action-pill.is-active {
  color: var(--blue-dark);
}

.article-actions .reaction-like.is-active {
  color: #d92d6b;
}

.article-actions .reaction-heart.is-active {
  color: #d92d6b;
}

.article-actions .action-pill[aria-disabled="true"] {
  opacity: 0.7;
  pointer-events: none;
}
.related a { transition: color 0.16s ease; }
.related a:hover { color: var(--blue); }

/* --------------------------------------------------------------- Forms */
.publish-form input,
.publish-form select,
.publish-form textarea,
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.custom-select-toggle,
.search-panel input {
  border-radius: 12px;
}

.publish-form input:focus,
.publish-form select:focus,
.publish-form textarea:focus,
.comment-form textarea:focus,
.comment-form input:focus,
.search-panel input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 99, 246, 0.14);
}

.tariff-option,
.next-steps article { border-radius: 14px; }

.tariff-option { transition: border-color 0.16s ease, box-shadow 0.16s ease; }
.tariff-option:has(input:checked) {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(52, 99, 246, 0.18);
}

.success-card,
.notice-card,
.success-flow { border-radius: var(--bp-radius); }

/* Account dashboard — round table shells to match the card system */
.account-table-wrap { border-radius: 14px; }
.empty-state { border-radius: 14px; }
.reaction-list-card { border-radius: 14px; }

/* Two-column layout with a profile / stats rail */
.account-page .content-grid.has-rail {
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 26px;
  align-items: start;
}

.account-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 92px;
}

.account-profile,
.account-stats,
.account-quick,
.account-profile-editor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-card-shadow);
}

.account-profile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 20px;
}

.account-profile__avatar img,
.account-profile__avatar .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
}

.account-profile__meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.account-profile__meta strong { font-family: var(--bp-display); font-weight: 700; font-size: 16px; }
.account-profile__meta span {
  color: var(--ink-soft);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-profile__logout { grid-column: 1 / -1; justify-content: center; }

/* Stats — hairline 2×2 grid */
.account-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 1px;
  background: var(--line);
  overflow: hidden;
}
.account-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px;
  background: var(--card);
}
.account-stat b {
  font-family: var(--bp-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--blue-dark);
}
.account-stat span { font-size: 12.5px; color: var(--ink-soft); }

.account-quick { padding: 20px; }
.account-quick h3 { margin: 0 0 8px; font-family: var(--bp-display); font-weight: 700; font-size: 15px; }
.account-quick a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--bp-body);
  font-weight: 600;
  font-size: 14px;
  color: #1f2530;
}
.account-quick a:last-child { border-bottom: 0; }
.account-quick a::after { content: "\2192"; color: var(--blue); }
.account-quick a:hover { color: var(--blue); }

/* Signature marker on account section headings */
.account-panel-head h2::before,
.account-subsection h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 0.74em;
  margin-right: 11px;
  vertical-align: -0.04em;
  border-radius: 3px;
  background: var(--blue);
  transform: rotate(-3deg);
}

/* Status chips inside tables now carry their tone colour */
.account-table th:nth-child(2),
.account-table td:nth-child(2) {
  width: 21%;
}

.account-table th:nth-child(3),
.account-table td:nth-child(3) {
  width: 17%;
}

.account-table mark {
  max-width: 150px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.18;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.account-table .payment-cell {
  align-items: flex-start;
  gap: 6px;
}

.account-table .payment-cell small {
  max-width: 150px;
}

.account-table tr.status-warning mark { background: #fef3c7; color: #92400e; }
.account-table tr.status-success mark { background: #dcfce7; color: #166534; }
.account-table tr.status-danger mark { background: #fee2e2; color: #991b1b; }
.account-table tr.status-info mark { background: var(--bp-accent-tint, #eaf0ff); color: var(--blue-dark); }

@media (max-width: 900px) {
  /* Rail moves above the tables; tables stack label over value */
  .account-page .content-grid.has-rail { display: flex; flex-direction: column; }
  .account-rail { order: -1; position: static; }

  .account-table td { grid-template-columns: 1fr; gap: 4px; }
  .account-table td::before { font-size: 11px; }
}

/* --------------------------------------------------------------- 404 */
.bp-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 620px;
  margin: clamp(40px, 8vw, 96px) auto;
  padding: clamp(28px, 4vw, 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--bp-radius);
  box-shadow: var(--bp-card-shadow);
}

.bp-404__code {
  font-family: var(--bp-display);
  font-weight: 800;
  font-size: clamp(72px, 14vw, 132px);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(150deg, var(--blue), var(--blue-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bp-404__title {
  margin: 14px 0 10px;
  font-size: clamp(24px, 3vw, 34px);
}

.bp-404__text {
  margin: 0 0 26px;
  max-width: 46ch;
  color: var(--ink-soft);
  line-height: 1.6;
}

.bp-404__search {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  margin-bottom: 22px;
}

.bp-404__search input {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--bp-body);
}

.bp-404__search input:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 99, 246, 0.14);
}

.bp-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 640px) {
  .bp-404page {
    padding: 16px 0 28px;
  }

  .bp-404 {
    width: min(100% - 28px, 620px);
    margin: 18px auto 28px;
    padding: 24px 16px;
    border-radius: 16px;
  }

  .bp-404__code {
    font-size: clamp(64px, 24vw, 96px);
  }

  .bp-404__title {
    max-width: 100%;
    font-size: 26px;
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .bp-404__text {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.55;
  }

  .bp-404__search {
    display: grid;
    gap: 10px;
    max-width: 100%;
  }

  .bp-404__search input,
  .bp-404__search .primary-button,
  .bp-404__actions .primary-button,
  .bp-404__actions .ghost-button {
    width: 100%;
  }

  .bp-404__actions {
    display: grid;
    width: 100%;
  }
}

/* --------------------------------------------------- Mobile menu */
/* Menu toggle: 3×3 dot grid that swaps to an X when open */
.mobile-menu-toggle { color: var(--ink, #14161b); }
.mobile-menu-toggle .menu-icon { display: block; width: 22px; height: 22px; }
.mobile-menu-toggle .menu-icon--close { display: none; }
.mobile-menu-toggle:hover { color: var(--blue); }
.mobile-menu-open .mobile-menu-toggle .menu-icon--grid { display: none; }
.mobile-menu-open .mobile-menu-toggle .menu-icon--close { display: block; }

@media (max-width: 900px) {
  .site-header .brand {
    display: inline-flex;
    justify-self: start;
    flex: 0 0 auto;
    width: fit-content;
    max-width: calc(100vw - 96px);
    overflow: hidden;
    font-family: var(--bp-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-toggle {
    display: inline-grid;
    place-items: center;
    border-color: #d3dbea;
    border-radius: 12px;
  }

  /* Open panel: clear separation from the page */
  .mobile-menu-open .desktop-nav {
    padding: 6px 0 4px;
    border-top: 1px solid var(--line);
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: stretch;
  }

  .desktop-nav .nav-menu { gap: 0; width: 100%; }

  .desktop-nav li + li { border-top: 1px solid var(--line); }

  /* Left-aligned, comfortable tap targets (was centred) */
  .desktop-nav a {
    justify-content: flex-start;
    width: 100%;
    min-height: 50px;
    padding: 0 6px;
    font-family: var(--bp-body);
    font-size: 16px;
    font-weight: 600;
    color: #2c3340;
    letter-spacing: 0;
    text-transform: none;
  }

  .desktop-nav a:hover,
  .desktop-nav .current-menu-item > a {
    color: var(--blue);
  }

  /* Actions block sits below the links with breathing room */
  .mobile-menu-open .header-actions {
    gap: 12px;
    padding: 14px 0 6px;
    border-top: 1px solid var(--line);
  }

  .header-actions .header-search { min-height: 48px; }
  .header-actions .primary-button,
  .header-actions .ghost-button { min-height: 48px; }
  .header-auth-button.ghost-button { border: 1px solid #d3dbea; }

  .mobile-profile-card {
    border-color: #d3dbea;
    border-radius: 18px;
    box-shadow: 0 14px 34px -28px rgba(28, 45, 110, 0.55);
  }

  .mobile-profile-card:hover {
    border-color: #b8c8f7;
    color: var(--ink);
    transform: none;
  }

  /* Opening animation: panel drops in, items + actions stagger up */
  @media (prefers-reduced-motion: no-preference) {
    .mobile-menu-open .desktop-nav { animation: bp-menu-drop 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

    .mobile-menu-open .desktop-nav li,
    .mobile-menu-open .header-actions {
      animation: bp-menu-item 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .mobile-menu-open .desktop-nav li:nth-child(1) { animation-delay: 0.05s; }
    .mobile-menu-open .desktop-nav li:nth-child(2) { animation-delay: 0.09s; }
    .mobile-menu-open .desktop-nav li:nth-child(3) { animation-delay: 0.13s; }
    .mobile-menu-open .desktop-nav li:nth-child(4) { animation-delay: 0.17s; }
    .mobile-menu-open .desktop-nav li:nth-child(5) { animation-delay: 0.21s; }
    .mobile-menu-open .desktop-nav li:nth-child(6) { animation-delay: 0.25s; }
    .mobile-menu-open .desktop-nav li:nth-child(n + 7) { animation-delay: 0.29s; }
    .mobile-menu-open .header-actions { animation-delay: 0.3s; }
  }
}

/* Icon morph: X rotates/scales in when the menu opens */
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu-open .mobile-menu-toggle .menu-icon--close {
    animation: bp-icon-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

@keyframes bp-menu-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes bp-menu-item {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: none; }
}

@keyframes bp-icon-in {
  from { opacity: 0; transform: rotate(-90deg) scale(0.55); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------- Reading rhythm */
.full-article h1 { line-height: 1.08; }

/* Comfortable measure for long-form reading (~70 chars) */
.full-article .article-text { max-width: 38em; }

/* Signature: in-article H2 carries the brand "marker" bar */
.article-text h2::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 3px;
  background: var(--blue);
  transform: rotate(-1deg);
}

/* ------------------------------------------------ Duotone imagery */
/* Desaturate + faint brand tint so stock photos read intentional;
   full colour returns on hover. */
.article-image { position: relative; }

.article-image img,
.related a img {
  filter: grayscale(0.5) contrast(1.04);
  transition: filter 0.4s ease;
}

.article-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--blue);
  opacity: 0.14;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.article-card:hover .article-image img { filter: grayscale(0); }
.article-card:hover .article-image::after { opacity: 0; }

/* ------------------------------------- Category colour-coded tags */
.tag[data-format="review"],
.bp-tag[data-format="review"] { background: #e2f5f1; color: #0f766e; }

.tag[data-format="rating"],
.bp-tag[data-format="rating"] { background: #fbeedd; color: #92590b; }

.tag[data-format="case"],
.bp-tag[data-format="case"] { background: #efeafe; color: #5b34c9; }

.tag[data-format="article"],
.bp-tag[data-format="article"] { background: #eef1f5; color: #475467; }

.tag[data-format="advertising"],
.bp-tag[data-format="advertising"] { background: #fdeaf3; color: #b03a73; }
/* guide + default keep the brand blue tint already set on .tag/.bp-tag */
