/* ================================================================
   LIFE-BALANCE & ARTICLE PAGES (/life-balance, /retirement-checklist, etc.)
   Cinematic, readable, modern editorial layout.
   Loads after /styles.min.css; uses its brand variables.
   ================================================================ */

:root {
  --lb-amber: #e8a33d;
  --lb-amber-soft: #f2c078;
  --lb-ink: #101f3c;
  --lb-cream: #faf6ef;
  --lb-paper: #fffdf8;
}

.lb-page {
  background: var(--lb-cream);
}

/* ---------- Reading Progress Bar ---------- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, #34d399 100%);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease-out;
  pointer-events: none;
}

/* ---------- Header ---------- */
.lb-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(16, 31, 60, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.lb-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.lb-header .logo-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
}

.lb-header .logo-sub {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.lb-header-nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
}

.lb-header-nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.lb-header-nav a:hover {
  color: var(--lb-amber-soft);
}

.lb-header-cta {
  margin-left: auto;
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.lb-hero {
  position: relative;
  min-height: clamp(400px, 58vh, 600px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--lb-ink);
}

.lb-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.lb-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(16, 31, 60, 0.95) 0%,
    rgba(16, 31, 60, 0.65) 45%,
    rgba(16, 31, 60, 0.2) 75%,
    rgba(16, 31, 60, 0.35) 100%
  );
}

.lb-hero-content {
  position: relative;
  z-index: 2;
  padding: 50px 0 58px;
  max-width: 780px;
}

.lb-kicker {
  display: inline-block;
  color: var(--lb-amber-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(242, 192, 120, 0.45);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 18px;
  background: rgba(16, 31, 60, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lb-title {
  color: #fff;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 14px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  letter-spacing: -0.02em;
}

.lb-title-en {
  display: block;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  font-weight: 500;
  font-family: "Inter", "Sarabun", sans-serif;
  color: var(--lb-amber-soft);
  letter-spacing: 0.06em;
  margin-top: 10px;
}

.lb-hero-sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.02rem, 2.2vw, 1.22rem);
  font-weight: 400;
  line-height: 1.75;
  margin: 0;
  max-width: 580px;
}

/* ---------- Breadcrumbs ---------- */
.lb-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #7a869c;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.lb-breadcrumbs a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.lb-breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--blue-deep);
}

.lb-breadcrumbs .sep {
  opacity: 0.45;
}

/* ---------- Byline & Meta Bar (Clean Editorial E-E-A-T) ---------- */
.lb-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f9fbfe;
  border: 1px solid rgba(16, 31, 60, 0.08);
  border-radius: 12px;
  margin-bottom: 24px;
}

.lb-byline-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.lb-byline-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 1.5px solid var(--blue);
  display: block;
}

.lb-byline-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.lb-byline-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-byline-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--navy);
  line-height: 1.3;
}

.lb-byline-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.lb-byline-verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #1a823b;
  background: #eaf8ee;
  padding: 2px 8px;
  border-radius: 999px;
}

.lb-byline-pending {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #975a16;
  background: #fefcbf;
  border: 1px solid rgba(183, 121, 31, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

.lb-byline-meta {
  font-size: 0.78rem;
  color: #718096;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.lb-byline-meta .dot {
  opacity: 0.4;
}

/* ---------- Table of Contents (Ultra-Clean Minimal 1-Column) ---------- */
.lb-toc {
  background: #fafcff;
  border: 1px solid #e2e8f4;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 28px;
}

.lb-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(16, 31, 60, 0.06);
}

.lb-toc-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.lb-toc-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #718096;
  background: #edf2f9;
  padding: 1px 7px;
  border-radius: 999px;
}

.lb-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-toc-list li {
  margin: 0;
  padding: 0;
}

.lb-toc-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.lb-toc-num {
  font-family: var(--font-en), monospace;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.lb-toc-text {
  flex: 1;
  line-height: 1.45;
}

.lb-toc-arrow {
  color: #a0aec0;
  font-size: 0.82rem;
  margin-left: auto;
  transition: transform 0.15s ease, color 0.15s ease;
}

.lb-toc-list a:hover {
  background: rgba(29, 87, 184, 0.08);
  color: var(--blue-deep);
  transform: translateX(3px);
}

.lb-toc-list a:hover .lb-toc-arrow {
  color: var(--blue);
  transform: translateX(3px);
}

/* ---------- Article prose ---------- */
.lb-article {
  padding: 48px 0 80px;
}

.lb-prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.95;
  color: #2c3a52;
}

.lb-prose p {
  margin: 0 0 1.4em;
}

.lb-prose h2 {
  color: var(--navy);
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  font-weight: 800;
  line-height: 1.4;
  margin: 2.2em 0 0.8em;
  padding-top: 0.4em;
  border-top: 1px solid rgba(16, 31, 60, 0.1);
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}

.lb-prose h2:first-child {
  border-top: none;
}

.lb-lead {
  font-size: 1.16rem;
  line-height: 1.95;
  color: #1c2941;
  margin-bottom: 1.6em;
}

.lb-lead em,
.lb-prose em {
  font-style: italic;
}

/* ---------- Definition box (AEO direct answer) ---------- */
.lb-defbox {
  background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid rgba(29, 87, 184, 0.22);
  border-left: 5px solid var(--blue);
  border-radius: 16px;
  padding: 26px 28px;
  margin: 2.2em 0;
  box-shadow: 0 8px 30px rgba(16, 31, 60, 0.06);
}

.lb-defbox-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.lb-defbox h2 {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
  font-size: 1.35rem;
}

.lb-defbox p:last-child {
  margin-bottom: 0;
}

/* ---------- Figures ---------- */
.lb-figure {
  margin: 2.4em 0;
}

.lb-figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(16, 31, 60, 0.18);
  display: block;
}

.lb-figure figcaption {
  text-align: center;
  font-size: 0.88rem;
  color: #7a869c;
  margin-top: 12px;
  font-style: italic;
}

/* ---------- 5-dimension cards ---------- */
.lb-dims {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 1.6em 0 2em;
}

.lb-dim {
  background: var(--lb-paper);
  border: 1px solid rgba(16, 31, 60, 0.08);
  border-radius: 14px;
  padding: 22px 22px 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lb-dim:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(16, 31, 60, 0.12);
}

.lb-dim-icon {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.lb-dim h3 {
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.lb-dim p {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #4a5872;
  margin: 0;
}

.lb-dim:last-child {
  grid-column: 1 / -1;
}

/* ---------- Checklist ---------- */
.lb-checklist {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 2em;
}

.lb-checklist li {
  position: relative;
  background: var(--lb-paper);
  border: 1px solid rgba(16, 31, 60, 0.08);
  border-radius: 10px;
  padding: 13px 18px 13px 46px;
  margin-bottom: 10px;
  font-size: 0.98rem;
  line-height: 1.7;
}

.lb-checklist li::before {
  content: "⚠️";
  position: absolute;
  left: 15px;
  top: 13px;
  font-size: 1rem;
}

/* ---------- Pull quote ---------- */
.lb-pullquote {
  margin: 2.6em 0;
  padding: 8px 0 8px 28px;
  border-left: 4px solid var(--lb-amber);
}

.lb-pullquote p {
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.8;
  color: var(--navy);
  margin: 0;
}

/* ---------- CTA card ---------- */
.lb-cta {
  margin: 3em 0;
}

.lb-cta-card {
  background: linear-gradient(160deg, var(--lb-ink) 0%, #1a3260 60%, #24406f 100%);
  border-radius: 20px;
  padding: 44px 40px;
  color: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(16, 31, 60, 0.3);
  position: relative;
  overflow: hidden;
}

.lb-cta-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 163, 61, 0.28), transparent 70%);
}

.lb-cta-kicker {
  color: var(--lb-amber-soft);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.lb-cta-card h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 14px;
  border: none;
  padding: 0;
}

.lb-cta-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.9;
  max-width: 560px;
  margin: 0 auto 14px;
}

.lb-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 26px 0 16px;
  position: relative;
  z-index: 1;
}

.lb-cta-btn {
  min-height: 52px;
  padding: 0 26px;
  font-size: 1rem;
  border-radius: 999px;
}

.lb-cta-line {
  background: #06c755;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
}

.lb-cta-line:hover {
  background: #05a948;
}

.lb-cta-note {
  font-size: 0.85rem !important;
  color: rgba(255, 255, 255, 0.6) !important;
  margin-bottom: 0 !important;
}

/* ---------- FAQ ---------- */
.lb-faq {
  margin: 3em 0 1em;
}

.lb-faq-item {
  background: var(--lb-paper);
  border: 1px solid rgba(16, 31, 60, 0.09);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.lb-faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--navy);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.lb-faq-item summary::-webkit-details-marker {
  display: none;
}

.lb-faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--lb-amber);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.lb-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.lb-faq-item p {
  padding: 0 22px 20px;
  margin: 0;
  font-size: 0.97rem;
  color: #4a5872;
  line-height: 1.9;
}

/* ---------- Tables (AEO & Comparison) ---------- */
.lb-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 2em 0;
  border-radius: 14px;
  border: 1px solid rgba(16, 31, 60, 0.12);
  box-shadow: 0 4px 20px rgba(16, 31, 60, 0.05);
  background: var(--lb-paper);
  -webkit-overflow-scrolling: touch;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
  line-height: 1.6;
}

.lb-table th,
.lb-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(16, 31, 60, 0.08);
}

.lb-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lb-table tr:last-child td {
  border-bottom: none;
}

.lb-table tr:nth-child(even) td {
  background: rgba(16, 31, 60, 0.02);
}

.lb-table .badge-good {
  display: inline-block;
  background: #e6f7eb;
  color: #1a823b;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 6px;
}

.lb-table .badge-warn {
  display: inline-block;
  background: #fef4e6;
  color: #c06900;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 6px;
}

/* ---------- Step-by-Step List ---------- */
.lb-steps {
  list-style: none;
  padding: 0;
  margin: 2em 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lb-step-item {
  background: var(--lb-paper);
  border: 1px solid rgba(16, 31, 60, 0.09);
  border-radius: 14px;
  padding: 22px 24px;
  position: relative;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lb-step-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 31, 60, 0.08);
}

.lb-step-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(29, 87, 184, 0.25);
}

.lb-step-content h3 {
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.lb-step-content p {
  font-size: 0.96rem;
  color: #4a5872;
  margin: 0;
  line-height: 1.8;
}

/* ---------- Highlight Box ---------- */
.lb-callout {
  background: #f0f7ff;
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 2em 0;
}

.lb-callout h3 {
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.lb-callout p {
  margin: 0;
  font-size: 0.96rem;
  color: #2c3a52;
  line-height: 1.8;
}

/* ---------- Related Articles ---------- */
.lb-related {
  margin-top: 4em;
  padding-top: 2.5em;
  border-top: 1px solid rgba(16, 31, 60, 0.12);
}

.lb-related-title {
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 20px;
  text-align: center;
}

.lb-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.lb-rel-card {
  background: var(--lb-paper);
  border: 1px solid rgba(16, 31, 60, 0.09);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lb-rel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(16, 31, 60, 0.12);
}

.lb-rel-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.lb-rel-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lb-rel-cat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.lb-rel-h {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
  margin: 0 0 10px;
  flex: 1;
}

.lb-rel-arrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Credit line ---------- */
.lb-credit {
  margin-top: 3em;
  padding-top: 1.4em;
  border-top: 1px dashed rgba(16, 31, 60, 0.15);
  font-size: 0.82rem;
  color: #93a0b5;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .lb-header-nav {
    display: none;
  }

  .lb-dims {
    grid-template-columns: 1fr;
  }

  .lb-cta-card {
    padding: 30px 20px;
    border-radius: 16px;
  }

  .lb-cta-card h2 {
    font-size: 1.3rem;
    line-height: 1.45;
  }

  .lb-cta-card p {
    font-size: 0.94rem;
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .lb-cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 20px 0 14px;
  }

  .lb-cta-btn {
    min-height: 46px;
    font-size: 0.92rem;
    padding: 0 16px;
    width: 100%;
    justify-content: center;
  }

  .lb-hero {
    min-height: clamp(360px, 52vh, 520px);
  }

  .lb-hero-content {
    padding: 40px 0 48px;
  }

  .lb-prose {
    font-size: 1rem;
  }

  .lb-step-item {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .lb-header-inner {
    gap: 10px;
    padding: 8px 0;
  }

  .lb-header .logo {
    gap: 8px;
    min-width: 0;
  }

  .lb-header .logo-icon img {
    width: 24px;
    height: 24px;
  }

  .lb-header .logo-name {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .lb-header .logo-sub {
    font-size: 0.64rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  .lb-header-cta {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 4px;
  }

  .lb-cta-card {
    padding: 24px 16px;
    border-radius: 14px;
  }

  .lb-cta-card h2 {
    font-size: 1.18rem;
  }

  .lb-cta-card p {
    font-size: 0.88rem;
    line-height: 1.6;
  }
}

@media (max-width: 360px) {
  .lb-header .logo-sub {
    display: none;
  }

  .lb-header-cta {
    padding: 0 9px;
    font-size: 0.76rem;
  }
}
