/* parler.SI custom styles: mobile optimization + monochrome refinement */

/* ---------- tier badges ---------- */
.tier-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  margin-right: 8px;
  vertical-align: middle;
}
.tier-paid {
  background: #2f2f2f;
  color: #fff;
}

/* ---------- pricing comparison ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.pricing-plan {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid #dedede;
  border-radius: 6px;
  background: #fff;
}
.pricing-plan-premium {
  border-color: #2f2f2f;
}
.pricing-label {
  margin: 0 0 0.35rem;
  color: #737373;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.pricing-plan h2 {
  margin: 0 0 0.5rem;
}
.pricing-price {
  margin: 0.4rem 0 1rem;
}
.pricing-price strong {
  color: #2f2f2f;
  font-size: 2rem;
  font-weight: 700;
}
.pricing-price span {
  color: #737373;
}
.pricing-plan ul {
  padding-left: 1.25rem;
}
.pricing-availability {
  margin: 1.2rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid #e7e7e7;
  color: #595959;
  font-size: 0.9rem;
  font-weight: 600;
}
@media screen and (max-width: 680px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.nav-account-item {
  white-space: nowrap;
}

.nav-account-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 4px;
  padding: 3px 7px;
  color: var(--light-grey);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.86em;
  line-height: 1.2;
  cursor: pointer;
}

.nav-account-placeholder:hover {
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

#page-header.nav-fixed #nav .nav-account-placeholder {
  border-color: rgba(47, 47, 47, 0.28);
  color: var(--font-color);
  background: rgba(47, 47, 47, 0.04);
}

#page-header.nav-fixed #nav .nav-account-placeholder:hover {
  border-color: #2f2f2f;
  color: #fff;
  background: #2f2f2f;
}

/* ---------- hero ---------- */
#page-header.full_page #site-title {
  letter-spacing: 0.02em;
}
#page-header.full_page #site-title .site-logo {
  height: 64px;
  width: auto;
  display: block;
  margin: 0 auto;
}
@media screen and (max-width: 768px) {
  #page-header.full_page #site-title .site-logo {
    height: 44px;
  }
}
#page-header.full_page #site-subtitle {
  font-size: 1.05rem;
  opacity: 0.85;
}

/* ---------- post images: never overflow, comfortable on mobile ---------- */
.post-content img,
#article-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* cover images in cards */
#recent-posts .post_cover img,
#recent-posts > .recent-post-item .post_cover img {
  object-fit: cover;
}

/* ---------- mobile ---------- */
@media screen and (max-width: 768px) {
  .nav-account-placeholder {
    padding: 4px 8px;
    font-size: 0.9em;
  }

  /* hero title scales down, stays above the globe */
  #page-header.full_page #site-title {
    font-size: 2rem;
  }
  #page-header.full_page #site-subtitle {
    font-size: 0.9rem;
    padding: 0 1.2rem;
  }

  /* nav: keep logo + hamburger on one line, no squeeze */
  #nav .site-name {
    font-size: 1.05rem;
  }
  #nav img.site-icon {
    height: 28px;
  }

  /* post cards go full width with breathing room */
  #recent-posts > .recent-post-item {
    margin: 0 0.6rem 1rem;
  }

  /* article typography for small screens */
  #article-container {
    padding: 1.2rem 1rem;
  }
  #article-container h1 { font-size: 1.5rem; }
  #article-container h2 { font-size: 1.3rem; }
  #article-container p,
  #article-container li {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  /* tables scroll horizontally instead of breaking layout */
  #article-container table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* footer legal links: comfortable tap targets */
  #footer-wrap a {
    padding: 0.2rem 0.1rem;
  }
}

/* very small screens */
@media screen and (max-width: 380px) {
  #page-header.full_page #site-title {
    font-size: 1.7rem;
  }
}

/* ---------- monochrome refinement ---------- */
/* soften Butterfly's default blue accents that theme_color doesn't cover */
#nav .menus_items .menus_item a:hover,
#page-header.nav-fixed #nav a:hover {
  color: #2f2f2f !important;
}

/* ---------- smooth expand-in-place for recent post cards ---------- */
#recent-posts .recent-post-item.expandable {
  flex-wrap: wrap;
  cursor: pointer;
}
#recent-posts .recent-post-item.expandable:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}
.post-expand {
  flex: 0 0 100%;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.recent-post-item.expanded .post-expand {
  grid-template-rows: 1fr;
}
.post-expand-body {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.35s ease 0.1s;
}
.recent-post-item.expanded .post-expand-body {
  opacity: 1;
}
/* hide the excerpt once the full article is shown */
.recent-post-item.expanded .recent-post-info .content {
  display: none;
}

/* loading dots */
.expand-loading {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 2.2rem 0;
}
.expand-loading span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #b5b5b5;
  animation: expand-blink 1.1s infinite;
}
.expand-loading span:nth-child(2) { animation-delay: 0.18s; }
.expand-loading span:nth-child(3) { animation-delay: 0.36s; }
@keyframes expand-blink {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* expanded article typography */
.expand-article {
  padding: 0.4rem 0.2rem 0;
  cursor: default;
}
.expand-article h1 { font-size: 1.45rem; margin: 1.2em 0 0.7em; }
.expand-article h2 { font-size: 1.25rem; margin: 1.4em 0 0.7em; padding-bottom: 0.3em; border-bottom: 1px solid #eee; }
.expand-article h3 { font-size: 1.1rem; margin: 1.2em 0 0.6em; }
.expand-article p, .expand-article li { font-size: 0.98rem; line-height: 1.8; color: #3a3a3a; }
.expand-article p { margin: 0 0 1em; }
.expand-article ul, .expand-article ol { margin: 0 0 1em 1.4em; }
.expand-article li { margin-bottom: 0.35em; }
.expand-article img { max-width: 100%; height: auto; border-radius: 8px; margin: 0.6em 0; }
.expand-article a { color: #2f2f2f; text-decoration: underline; text-underline-offset: 3px; }
.expand-article blockquote {
  margin: 1em 0; padding: 0.8em 1.1em;
  border-left: 3px solid #2f2f2f; background: #f7f7f7; border-radius: 0 8px 8px 0;
}
.expand-article blockquote p { margin: 0; color: #555; }
.expand-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em; background: #f1f1f1; padding: 0.15em 0.4em; border-radius: 4px;
}
.expand-article pre {
  background: #1e1e1e; border-radius: 8px; padding: 1em 1.2em;
  overflow-x: auto; margin: 1em 0;
}
.expand-article pre code { background: none; padding: 0; color: #e8e8e8; }
.expand-article hr { border: none; border-top: 1px solid #e5e5e5; margin: 1.6em 0; }
.expand-error { padding: 1.5rem 0; color: #888; }

/* actions row */
.expand-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 0.2rem 0.6rem;
  border-top: 1px solid #eee;
  margin-top: 1.2rem;
}
.collapse-btn {
  border: 1px solid #d5d5d5;
  background: #fff;
  border-radius: 20px;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  color: #2f2f2f;
  cursor: pointer;
  transition: all 0.2s;
}
.collapse-btn:hover { background: #2f2f2f; color: #fff; border-color: #2f2f2f; }
.open-full { font-size: 0.88rem; color: #777; text-decoration: none; }
.open-full:hover { color: #2f2f2f; }

@media screen and (max-width: 768px) {
  .expand-article { padding: 0.2rem 0 0; }
  .expand-actions { flex-wrap: wrap; }
}
