/*
Theme Name: Life Success Engine
Theme URI: https://lifesuccessengine.com
Author: Mark Farmer
Description: Custom classic theme for LifeSuccessEngine.com. Works with WooCommerce, bbPress, Simple Membership and Elementor.
Version: 0.10.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: lse
*/

:root {
  --canvas: #f5f5f7;
  --white: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #474747;
  --control: #e2e2e5;
  --control-ink: #333336;
  --hairline: #d6d6d6;
  --link: #0066cc;
  --accent: #c4661a;        /* the single action colour: change here to retune every button */
  --accent-hover: #a85615;
  --radius-card: 28px;
  --radius-pill: 980px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1200px;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3, h4 { font-weight: 600; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.06; letter-spacing: -0.015em; }
h2 { font-size: clamp(32px, 4vw, 39px); line-height: 1.07; letter-spacing: -0.009em; }
h3 { font-size: 28px; line-height: 1.14; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius-pill);
}
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 clamp(24px, 4vw, 48px); }

/* Buttons: two archetypes */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: 600 17px/1.2 var(--font); letter-spacing: -0.022em;
  padding: 11px 20px; border-radius: var(--radius-pill);
  background: var(--control); color: var(--control-ink);
}
.btn:hover { background: #d4d4d8; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--hairline);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header .wrap { max-width: 1360px; }
.site-header__inner {
  display: flex; align-items: center; gap: 20px; min-height: 64px;
}
.site-brand {
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap; flex: none;
}
.site-brand img { max-height: 36px; width: auto; }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav .menu { display: flex; align-items: center; gap: 4px; }
.primary-nav .menu > li { position: relative; }
.primary-nav a {
  display: block; padding: 10px 9px; white-space: nowrap; border-radius: 10px;
  font-size: 14px; font-weight: 400; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a { background: var(--canvas); }

.menu-item-has-children { display: flex; align-items: center; }
.submenu-toggle {
  width: 28px; height: 28px; margin-left: -8px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; position: relative;
}
.submenu-toggle::before {
  content: ""; position: absolute; left: 9px; top: 9px; width: 6px; height: 6px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
}
.submenu-toggle:hover { background: var(--canvas); }

.primary-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px; z-index: 10;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 20px;
  padding: 8px;
}
.primary-nav .sub-menu a { font-size: 14px; padding: 10px 14px; }
@media (min-width: 1181px) {
  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu,
  .menu-item-has-children.is-open > .sub-menu { display: block; }
  .menu-item-has-children { flex-wrap: nowrap; }
}

.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.header-tools a { font-size: 14px; text-decoration: none; }
.tool-pill {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  background: var(--canvas); color: var(--ink);
  padding: 8px 14px; border-radius: var(--radius-pill); font-weight: 400;
}
.tool-pill:hover { background: var(--control); }
.tool-pill--join { background: var(--accent); color: #fff; font-weight: 600; }
.tool-pill--join:hover { background: var(--accent-hover); }
.cart-icon { width: 18px; height: 18px; }
.cart-count { font-weight: 600; font-variant-numeric: tabular-nums; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--canvas); cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before {
  position: absolute; left: 13px; width: 18px; height: 1.5px; background: var(--ink); content: "";
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: 6px; left: 0; }

@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-header__inner { flex-wrap: wrap; }
  .site-brand { flex: 1; }
  .nav-toggle { margin-left: 0; }
  .primary-nav, .header-tools { display: none; width: 100%; }
  .site-header.is-open .primary-nav,
  .site-header.is-open .header-tools { display: block; }
  .site-header.is-open .header-tools { display: flex; padding-bottom: 20px; }
  .primary-nav .menu { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
  .primary-nav a { font-size: 17px; padding: 12px 8px; }
  .menu-item-has-children { flex-wrap: wrap; }
  .menu-item-has-children > a { flex: 1; }
  .submenu-toggle { width: 44px; height: 44px; margin: 0; }
  .submenu-toggle::before { left: 18px; top: 17px; }
  .primary-nav .sub-menu {
    position: static; display: none; width: 100%; border: 0; border-radius: 0;
    padding: 0 0 4px 16px; background: transparent;
  }
  .menu-item-has-children.is-open > .sub-menu { display: block; }
}

/* ---------- Basic content (full styling comes in later steps) ---------- */
.site-main { padding: 48px 0 80px; }
.entry-title { margin-bottom: 24px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 80px; }
.hero__text { max-width: 760px; }
.hero h1 { margin-bottom: 16px; }
.tint { color: #03873a; }
.hero__intro { font-size: 21px; line-height: 1.33; letter-spacing: .011em; color: var(--ink-soft); margin: 0 0 28px; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero__image { margin: 56px 0 0; border-radius: var(--radius-card); overflow: hidden; background: var(--canvas); }
.hero__image img { width: 100%; height: auto; }
@media (max-width: 640px) {
  .hero { padding: 40px 0 56px; }
  .hero__intro { font-size: 19px; }
  .hero__image { margin-top: 36px; border-radius: 20px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--canvas); padding: 56px 0 40px; font-size: 14px; color: var(--ink-soft); }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--hairline); }
.social-links { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social-links__a {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--white); color: var(--ink);
}
.social-links__a:hover { background: var(--control); }
.footer-menu { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 28px 0; padding: 0; }
.footer-menu a { color: var(--ink); text-decoration: none; }
.footer-menu a:hover { text-decoration: underline; }
.site-footer__copy { margin: 0; }

/* ---------- Life areas carousel ---------- */
.areas { background: var(--canvas); padding: 72px 0 80px; }
.areas__head { margin-bottom: 32px; }
.areas__head h2 { margin: 0; max-width: 16em; }

.areas__stage { position: relative; }
.areas__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border: 1px solid var(--hairline); border-radius: 50%; cursor: pointer;
  background: var(--white); color: var(--ink); font: 400 28px/1 var(--font); padding: 0 0 4px;
}
.areas__btn[hidden] { display: none; }
.areas__btn:hover { background: var(--control); }
.areas__btn--prev { left: -22px; }
.areas__btn--next { right: -22px; }

.areas__track {
  display: flex; gap: 20px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.areas__track::-webkit-scrollbar { display: none; }
.areas__item { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; min-width: 0; }

.area-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white); border-radius: var(--radius-card); overflow: hidden;
  color: var(--ink); text-decoration: none;
}
.area-card__media { display: block; position: relative; aspect-ratio: 3 / 2; background: var(--control); overflow: hidden; }
.area-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.area-card__body { display: block; padding: 20px 24px 28px; }
.area-card__title { display: block; font-size: 24px; line-height: 1.14; font-weight: 600; letter-spacing: -0.009em; margin-bottom: 6px; }
.area-card__desc { display: block; color: var(--ink-soft); font-size: 15px; line-height: 1.4; }
.area-card:hover .area-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

@media (max-width: 960px) {
  .areas__item { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 640px) {
  .areas { padding: 48px 0 56px; }
  .areas__item { flex-basis: 78%; }
  .areas__btn--prev { left: 4px; }
  .areas__btn--next { right: 4px; }
  .areas__btn { width: 40px; height: 40px; }
  .areas__head { margin-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) { .areas__track { scroll-behavior: auto; } }

/* ---------- Shared section bits ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-intro { font-size: 21px; line-height: 1.33; color: var(--ink-soft); margin: 0 0 32px; max-width: 32em; }

/* ---------- Wheel of Life ---------- */
.wheel { padding: 80px 0; }
.wheel h2 { margin-bottom: 12px; }
.wheel__tool { max-width: 100%; overflow-x: auto; }

/* ---------- Latest articles ---------- */
.latest { background: var(--canvas); padding: 72px 0 80px; }
.latest__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.post-card { background: var(--white); border-radius: var(--radius-card); overflow: hidden; }
.post-card__link { display: flex; height: 100%; color: var(--ink); text-decoration: none; }
.post-card__media { display: block; position: relative; flex: 0 0 40%; min-height: 150px; background: var(--control); }
.post-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: block; padding: 20px 24px; align-self: center; }
.post-card__title { display: block; font-size: 19px; line-height: 1.25; font-weight: 600; margin-bottom: 6px; }
.post-card__excerpt { display: block; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
.post-card__link:hover .post-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.post-card--lead { grid-column: 1 / -1; }
.post-card--lead .post-card__media { flex-basis: 50%; aspect-ratio: 16 / 9; min-height: 0; }
.post-card--lead .post-card__body { padding: 32px 40px; }
.post-card--lead .post-card__title { font-size: 28px; line-height: 1.14; margin-bottom: 12px; }
.post-card--lead .post-card__excerpt { font-size: 17px; }

@media (max-width: 860px) {
  .latest__grid { grid-template-columns: 1fr; }
  .post-card--lead .post-card__link { flex-direction: column; }
  .post-card--lead .post-card__media { flex-basis: auto; width: 100%; }
  .post-card--lead .post-card__body { padding: 24px; }
}
@media (max-width: 640px) {
  .post-card__link { flex-direction: column; }
  .post-card__media { flex: none; width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
  .post-card__body { padding: 16px 20px 22px; }
  .post-card__title { font-size: 19px; }
  .post-card--lead .post-card__body { padding: 16px 20px 22px; }
  .post-card--lead .post-card__title { font-size: 22px; }
  .post-card__excerpt, .post-card--lead .post-card__excerpt {
    font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
}

/* ---------- Popular products ---------- */
.popular { padding: 72px 0 96px; }
.popular__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.product-tile { display: block; color: var(--ink); text-decoration: none; }
.product-tile__media { display: block; aspect-ratio: 1 / 1; background: var(--canvas); border-radius: 20px; overflow: hidden; margin-bottom: 12px; }
.product-tile__media img { width: 100%; height: 100%; object-fit: cover; }
.product-tile__title { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.product-tile__price { display: block; font-size: 14px; color: var(--ink-soft); }
.product-tile__price del { opacity: .6; margin-right: 4px; }
.product-tile__price ins { text-decoration: none; }
.product-tile:hover .product-tile__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 1000px) { .popular__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .popular__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .popular { padding: 48px 0 64px; } }

/* ---------- Community topics ---------- */
.community { background: var(--canvas); padding: 72px 0 96px; }
.topic-list { list-style: none; margin: 0; padding: 8px 0; background: var(--white); border-radius: var(--radius-card); }
.topic-list__item + .topic-list__item { border-top: 1px solid var(--hairline); }
.topic-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 32px; color: var(--ink); text-decoration: none; }
.topic-row__main { display: block; min-width: 0; }
.topic-row__title { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; }
.topic-row__meta { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.topic-row__count { flex: none; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.topic-row:hover .topic-row__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .community { padding: 48px 0 64px; }
  .topic-row { padding: 16px 20px; flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- Inner pages ---------- */
.elementor-page .site-main, .elementor-page.page .site-main { padding: 0; }

.layout--sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
@media (max-width: 960px) { .layout--sidebar { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.entry__header { margin-bottom: 32px; }
.entry__title { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.012em; margin: 0 0 12px; }
.entry__meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; font-size: 14px; color: var(--ink-soft); }
.entry__meta a { color: var(--ink-soft); }
.entry__image { margin: 0 0 40px; border-radius: var(--radius-card); overflow: hidden; background: var(--canvas); }
.entry__image img { width: 100%; height: auto; max-height: 520px; object-fit: cover; }

.entry-content { font-size: 17px; line-height: 1.65; }
.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content h2 { font-size: 32px; line-height: 1.12; margin: 1.8em 0 .5em; }
.entry-content h3 { font-size: 24px; line-height: 1.2; margin: 1.6em 0 .5em; }
.entry-content h4 { font-size: 19px; margin: 1.4em 0 .4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .4em; }
.entry-content img { border-radius: 20px; }
.entry-content figcaption, .wp-caption-text { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding: 20px 28px; background: var(--canvas); border-radius: 20px; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.4em 0; }
.entry-content pre { overflow-x: auto; padding: 20px; background: var(--canvas); border-radius: 20px; font-size: 14px; }
.entry-content table { display: block; overflow-x: auto; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px 14px; border-bottom: 1px solid var(--hairline); text-align: left; }
.entry__tags { margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.entry__tags a { display: inline-block; padding: 6px 14px; background: var(--canvas); border-radius: var(--radius-pill); color: var(--ink); font-size: 14px; text-decoration: none; }
.entry__tags a:hover { background: var(--control); }
.page-links { font-size: 14px; }

/* Reading column: centered when there is no sidebar */
.layout:not(.layout--sidebar) > .layout__main { max-width: 820px; margin-left: auto; margin-right: auto; }
.entry--page { max-width: 820px; margin-left: auto; margin-right: auto; }
.entry--page.entry--wide { max-width: none; }
.entry--wide .entry__title { font-size: clamp(30px, 4vw, 44px); }
.bbpress .entry__title { font-size: clamp(28px, 3.4vw, 40px); }
.entry-content .alignwide { max-width: none; }

/* Previous / next article */
.post-navigation { margin-top: 56px; margin-bottom: 56px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; height: 100%; padding: 20px 24px; background: var(--canvas); border-radius: 20px; color: var(--ink); text-decoration: none; }
.post-navigation a:hover .nav-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-navigation .nav-next { grid-column: 2; text-align: right; }
.nav-sub { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.nav-title { display: block; font-weight: 600; line-height: 1.3; }
@media (max-width: 600px) { .post-navigation .nav-links { grid-template-columns: 1fr; } .post-navigation .nav-next { grid-column: auto; text-align: left; } }

/* Article lists */
.archive-header { max-width: 760px; margin-bottom: 40px; }
.archive-header__desc { color: var(--ink-soft); font-size: 19px; line-height: 1.4; margin-bottom: 24px; }
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.layout--sidebar .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-tile { background: var(--canvas); border-radius: var(--radius-card); overflow: hidden; }
.post-tile__link { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.post-tile__media { display: block; position: relative; aspect-ratio: 3 / 2; background: var(--control); }
.post-tile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-tile__body { display: block; padding: 18px 22px 24px; }
.post-tile__title { display: block; font-size: 19px; font-weight: 600; line-height: 1.25; margin-bottom: 6px; }
.post-tile__excerpt { display: block; font-size: 15px; line-height: 1.4; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-tile__link:hover .post-tile__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 960px) { .tile-grid, .layout--sidebar .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tile-grid, .layout--sidebar .tile-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

.navigation.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { padding: 10px 16px; border-radius: var(--radius-pill); background: var(--canvas); color: var(--ink); text-decoration: none; font-size: 15px; }
.pagination a.page-numbers:hover { background: var(--control); }
.pagination .page-numbers.current { background: var(--ink); color: var(--white); }

/* Forms on inner pages */
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form__input,
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea,
.widget input[type="search"], .widget input[type="text"], .widget select {
  width: 100%; padding: 12px 16px; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--hairline); border-radius: 14px;
}
.search-form__input { border-radius: var(--radius-pill); padding: 11px 20px; }
.comment-form label { display: block; font-size: 14px; margin-bottom: 4px; }
.comment-form p { margin: 0 0 16px; }

/* Comments */
.comments { margin-top: 64px; }
.comments__title, .comment-reply-title { font-size: 28px; line-height: 1.14; margin-bottom: 24px; }
.comments { font-size: 17px; line-height: 1.55; }
.comment-content p { font-size: 17px; margin: 8px 0 12px; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 20px 0; border-top: 1px solid var(--hairline); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; }
.comment-author img { border-radius: 50%; margin-right: 10px; float: left; }
.comment-metadata a { color: var(--ink-soft); }
.reply a { font-size: 14px; }

/* Sidebar widgets */
.sidebar .widget { background: var(--canvas); border-radius: var(--radius-card); padding: 24px 28px; margin-bottom: 20px; }
.widget-title { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li + li { margin-top: 8px; }
.widget a { color: var(--ink); text-decoration: none; }
.widget a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Related articles (theme block) */
.related-posts { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.related-posts h2 { font-size: 28px; line-height: 1.14; margin: 0 0 20px; }
.post-tile__score {
  position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.94); color: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* Safety net if the YARPP plugin still prints its own block */
.yarpp.yarpp-related { margin: 56px 0 0; padding: 32px 0 0; border-top: 1px solid var(--hairline); }
.yarpp.yarpp-related h3 { font-size: 28px; line-height: 1.14; margin: 0 0 20px; }
.yarpp.yarpp-related ol, .yarpp.yarpp-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.yarpp.yarpp-related li { margin: 0; padding: 18px 22px; background: var(--canvas); border-radius: 20px; overflow: hidden; }
.yarpp.yarpp-related li > a { color: var(--ink); font-weight: 600; text-decoration: none; }
.yarpp.yarpp-related .yarpp-score { font-size: 12px; color: var(--ink-soft); }
.yarpp.yarpp-related .yarpp-excerpt { display: block; margin-top: 6px; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
.yarpp.yarpp-related .yarpp-thumbnails-horizontal { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.yarpp.yarpp-related .yarpp-thumbnails-horizontal .yarpp-thumbnail { display: block; float: none; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: var(--canvas); border-radius: 20px; overflow: hidden; color: var(--ink); text-align: left; text-decoration: none; }
.yarpp.yarpp-related .yarpp-thumbnails-horizontal .yarpp-thumbnail > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: 0; }
.yarpp.yarpp-related .yarpp-thumbnails-horizontal .yarpp-thumbnail-title { display: block; max-width: none; height: auto; margin: 0; padding: 12px 16px 16px; font-size: 15px; font-weight: 600; line-height: 1.3; }

/* No sticky underline after a tap on touch screens */
@media (hover: none) {
  .area-card:hover .area-card__title, .post-card__link:hover .post-card__title, .post-tile__link:hover .post-tile__title,
  .product-tile:hover .product-tile__title, .topic-row:hover .topic-row__title, .post-navigation a:hover .nav-title { text-decoration: none; }
}

/* ---------- Account menu (logged in) ---------- */
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu__btn { padding: 4px 14px 4px 4px; }
.account-avatar { width: 28px; height: 28px; border-radius: 50%; display: block; }
.account-menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; padding: 8px;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 20px;
}
.header-tools .account-menu__panel a { display: block; padding: 10px 14px; border-radius: 12px; color: var(--ink); font-size: 14px; }
.header-tools .account-menu__panel a:hover { background: var(--canvas); }
@media (max-width: 1180px) {
  .account-menu__panel { position: static; min-width: 0; margin-top: 8px; border: 0; padding: 0; }
}

/* ---------- Simple Membership pages (login, registration, profile, password reset) ---------- */
.entry--page .entry-content pre { font-family: inherit; font-size: 17px; line-height: 1.55; white-space: pre-wrap; background: var(--canvas); }
.entry-content [class*="swpm"] table, .entry-content form[class*="swpm"] table { display: table; width: 100%; max-width: 680px; border-collapse: collapse; overflow: visible; }
.entry-content [class*="swpm"] th, .entry-content [class*="swpm"] td { padding: 10px 8px; vertical-align: middle; text-align: left; border-bottom: 1px solid var(--hairline); font-size: 16px; }
.entry-content [class*="swpm"] label { font-size: 14px; font-weight: 600; }
.entry-content [class*="swpm"] input[type="text"], .entry-content [class*="swpm"] input[type="password"],
.entry-content [class*="swpm"] input[type="email"], .entry-content [class*="swpm"] input[type="tel"],
.entry-content [class*="swpm"] select, .entry-content [class*="swpm"] textarea,
.entry-content form[class*="swpm"] input[type="text"], .entry-content form[class*="swpm"] input[type="password"] {
  width: 100%; max-width: 100%; padding: 11px 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1px solid var(--hairline); border-radius: 14px; box-sizing: border-box;
}
.entry-content [class*="swpm"] input[type="submit"], .entry-content [class*="swpm"] button[type="submit"],
.entry-content .swpm-login-form-submit, .entry-content input.swpm-registration-submit {
  padding: 13px 28px; font: 600 17px/1.2 var(--font); color: #fff; background: var(--accent);
  border: 0; border-radius: 980px; cursor: pointer; width: auto;
}
.entry-content [class*="swpm"] input[type="submit"]:hover, .entry-content [class*="swpm"] button[type="submit"]:hover { background: var(--accent-hover); }
.entry-content [class*="swpm"] .swpm-login-form-submit-section, .entry-content [class*="swpm"] p { margin-bottom: 16px; }
.entry-content .swpm-login-widget-form, .entry-content .swpm-login-form-inner { max-width: 420px; }
.entry-content [class*="swpm"] .swpm-registration-success-msg, .entry-content [class*="swpm"] .swpm-profile-update-success { background: var(--canvas); border-radius: 16px; padding: 14px 18px; }
