/* ============================================================
   TRUSTD — Plus Jakarta Sans Design
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html { overflow-x: clip; }

:root {
  --primary: 19 89% 54%;
  --bg: 60 29% 95%;
  --fg: 20 14% 16%;
  --muted: 24 10% 58%;
  --secondary: 60 29% 95%;
  --border: 30 15% 88%;
  --radius: 0.75rem;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #fff;
  color: hsl(var(--fg));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

.gradient-warm { background: linear-gradient(135deg, hsl(19 89% 54%), hsl(28 90% 58%), hsl(35 90% 62%)); }

/* ---- Animations ---- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---- Nav ---- */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: .75rem 1rem;
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
/* Blog/article pages: nav stays transparent (same as homepage) */
/* Push blog content below the fixed nav */
.blog-post,
.blog-list { padding-top: 4.5rem; background: hsl(var(--secondary)); }
.nav-pill {
  max-width: 960px; margin: 0 auto;
  border-radius: 9999px; background: #fff;
  border: 1px solid hsl(var(--border));
  padding: .75rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
@media(min-width:768px) { .nav-pill { padding: .75rem 2rem; } }
.nav-logo { display: flex; align-items: center; gap: .5rem; }
.nav-logo img { height: 28px; width: 28px; border-radius: 50%; }
.nav-logo span { font-weight: 700; font-size: 1.125rem; color: hsl(var(--fg)); }
.nav-links { display: none; align-items: center; gap: 1.5rem; }
@media(min-width:768px) { .nav-links { display: flex; } }
.nav-links a { font-weight: 500; font-size: 15px; color: hsl(var(--fg)); transition: color .2s; }
.nav-links a:hover { color: hsl(var(--primary)); }
.nav-actions { display: flex; align-items: center; gap: .25rem; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; border-radius: var(--radius); transition: all .2s; gap: .5rem; }
.btn-primary { background: hsl(var(--primary)); color: #fff; padding: .625rem 1.25rem; font-size: .875rem; }
.btn-primary:hover { opacity: .9; }
.btn-sm { padding: .5rem 1.25rem; font-size: .875rem; border-radius: 9999px; }
.btn-ghost { background: transparent; color: hsl(var(--fg)); padding: .5rem .75rem; font-size: .875rem; border-radius: var(--radius); }
.btn-ghost:hover { background: hsl(var(--secondary)); }
.btn-outline { background: transparent; border: 1px solid hsl(var(--primary)); color: hsl(var(--primary)); padding: .625rem 1.25rem; font-size: .875rem; }
.btn-outline:hover { background: hsl(var(--primary) / .1); }
.btn-lg { padding: .875rem 2rem; font-size: 1rem; border-radius: .75rem; }
.btn-white { background: hsl(var(--bg)); color: hsl(var(--primary)); font-weight: 600; padding: .875rem 2rem; font-size: 1rem; border-radius: .75rem; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.btn-white:hover { opacity: .9; }

/* ---- Mobile menu ---- */
.login-link { display: none; }
@media(min-width:768px) { .login-link { display: block; } }
.mobile-menu-btn { display: flex; background: transparent; padding: .5rem; border-radius: 9999px; color: hsl(var(--fg)); }
@media(min-width:768px) { .mobile-menu-btn { display: none; } }
.mobile-menu { display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 260px; background: #fff; z-index: 100; padding: 2rem; flex-direction: column; gap: 1rem; box-shadow: -4px 0 24px rgba(0,0,0,.1); }
.mobile-menu.open { display: flex; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 99; }
.mobile-overlay.open { display: block; }
.mobile-menu a { font-size: 1.125rem; font-weight: 500; color: hsl(var(--fg)); padding: .5rem 0; }
.mobile-menu-close { align-self: flex-end; background: transparent; color: hsl(var(--fg)); padding: .5rem; border-radius: 9999px; margin-bottom: .25rem; }
.mobile-menu-close:hover { background: hsl(var(--secondary)); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, hsl(35 90% 65% / .4), transparent 60%); }
.hero-inner { position: relative; z-index: 10; max-width: 1200px; margin: 0 auto; padding: 6rem 2rem 3rem; display: grid; gap: 1rem; align-items: center; }
@media(min-width:768px) { .hero-inner { grid-template-columns: 1fr 1fr; gap: 4rem; padding: 9rem 4rem 8rem; } }
.hero-text { text-align: center; display: flex; flex-direction: column; align-items: center; }
@media(min-width:768px) { .hero-text { text-align: left; align-items: flex-start; } }
.hero-text h1 { font-size: clamp(1.875rem, 7vw, 2.5rem); font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 1.5rem; }
@media(min-width:768px) { .hero-text h1 { font-size: 5rem; line-height: 86px; } }
.hero-text p { font-size: 1.125rem; color: rgba(255,255,255,.8); max-width: 32rem; margin-bottom: 2.5rem; line-height: 1.7; }
.social-proof { margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: .375rem; font-size: .875rem; color: rgba(255,255,255,.7); }
@media(min-width:768px) { .social-proof { justify-content: flex-start; } }
.hero-mockup { display: flex; justify-content: center; padding-top: 5rem; padding-bottom: .5rem; overflow: hidden; width: 100%; }
@media(min-width:768px) { .hero-mockup { padding-top: 0; padding-bottom: 0; overflow: visible; } }

/* ---- Phone mockup ---- */
.phone-wrap { position: relative; width: 480px; display: flex; align-items: center; justify-content: center; transform: scale(.65); transform-origin: top center; height: 260px; }
@media(min-width:768px) { .phone-wrap { transform: scale(1); height: 500px; } }
.phone { width: 200px; height: 440px; background: #fff; border-radius: 2rem; padding: .5rem; box-shadow: 0 4px 24px rgba(0,0,0,.08); border: 1px solid hsl(var(--border)); z-index: 10; position: relative; }
.phone-screen { background: hsl(var(--bg)); border-radius: 1.5rem; overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.phone-status { height: 20px; background: hsl(var(--secondary) / .5); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.phone-notch { width: 48px; height: 4px; background: hsl(var(--fg) / .2); border-radius: 9999px; }
.phone-nav { display: flex; align-items: center; justify-content: space-between; padding: .5rem .625rem; border-bottom: 1px solid hsl(var(--border) / .5); flex-shrink: 0; font-size: 9px; font-weight: 600; color: hsl(var(--fg)); }
.phone-banner { height: 96px; overflow: hidden; flex-shrink: 0; position: relative; }
.phone-banner img { width: 100%; height: 100%; object-fit: cover; }
.phone-banner-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.phone-banner-overlay span:first-child { font-size: 9px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.phone-banner-overlay span:last-child { font-size: 7px; background: #fff; color: #000; padding: 2px 8px; border-radius: 9999px; font-weight: 600; }
.phone-products { padding: .5rem; flex: 1; overflow: hidden; }
.phone-products-label { font-size: 7px; font-weight: 500; color: hsl(var(--muted)); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.phone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.phone-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.phone-grid .name { font-size: 7px; font-weight: 500; color: hsl(var(--fg)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-grid .price { font-size: 7px; font-weight: 600; color: hsl(var(--fg)); }
.cart-badge { position: absolute; top: -4px; right: -6px; height: 12px; width: 12px; border-radius: 50%; background: hsl(var(--primary)); color: #fff; font-size: 6px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---- Floating cards ---- */
.float-card { position: absolute; z-index: 20; background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.float-stats { width: 130px; top: 30px; left: -16px; padding: 10px; transform: rotate(-4deg); }
@media(min-width:768px) { .float-stats { left: 0; } }
.float-stats .title { font-size: 8px; font-weight: 600; color: #888; margin-bottom: 6px; }
.float-stats .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.float-stats .row .label { font-size: 8px; color: #666; }
.float-stats .row .val { font-size: 9px; font-weight: 700; color: #111; }
.float-stats .up { color: #22c55e; font-size: 8px; margin-left: 2px; }
.float-product { width: 100px; top: 20px; right: -8px; overflow: hidden; transform: rotate(5deg); }
@media(min-width:768px) { .float-product { right: 10px; } }
.float-product img { width: 100%; height: 60px; object-fit: cover; }
.float-product .info { padding: 6px; }
.float-product .info .name { font-size: 8px; font-weight: 600; color: #111; }
.float-product .info .price { font-size: 8px; font-weight: 700; color: #111; }
.float-product .buy { margin-top: 4px; background: #111; color: #fff; font-size: 7px; font-weight: 600; text-align: center; padding: 2px 0; border-radius: 9999px; }
.float-coupon { position: absolute; z-index: 20; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.08); border: 1px dashed #ccc; padding: 8px 10px; bottom: 30px; left: -8px; transform: rotate(-2deg); }
@media(min-width:768px) { .float-coupon { left: 15px; } }
.float-coupon .label { font-size: 7px; color: #999; font-weight: 500; margin-bottom: 4px; }
.float-coupon .code { display: flex; align-items: center; gap: 6px; font-size: 8px; font-weight: 600; color: #555; }
.float-review { position: absolute; z-index: 20; background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.1); padding: 8px 10px; width: 125px; bottom: 40px; right: -4px; transform: rotate(3deg); }
@media(min-width:768px) { .float-review { right: 15px; } }
.float-review .reviewer { font-size: 8px; font-weight: 700; color: #111; }
.float-review .excerpt { font-size: 7px; color: #888; margin-top: 2px; }
.float-review .stars { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.float-review .stars span { font-size: 7px; color: #facc15; }
.float-review .stars .score { font-size: 7px; font-weight: 600; color: #555; }

/* ---- Sections ---- */
.section { padding: 5rem 1.5rem; background: #fff; }
@media(min-width:768px) { .section { padding: 7rem 1.5rem; } }
.section-inner { max-width: 960px; margin: 0 auto; }
.section-alt { background: hsl(var(--secondary)); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 1.875rem; font-weight: 800; color: hsl(var(--fg)); margin-bottom: 1rem; }
@media(min-width:768px) { .section-header h2 { font-size: 3rem; } }
.section-header p { font-size: 1.125rem; color: hsl(var(--muted)); }

/* ---- How it works ---- */
.steps-grid { display: grid; gap: 2.5rem; }
@media(min-width:768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step-mockup { margin-bottom: 1.25rem; }
.step-num { height: 32px; width: 32px; border-radius: 50%; background: hsl(var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 700; flex-shrink: 0; }
.step-title-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.step h3 { font-size: 1.25rem; font-weight: 600; color: hsl(var(--fg)); }
.step p { color: hsl(var(--muted)); line-height: 1.6; padding: 0 .5rem; }
.section-cta-center { text-align: center; margin-top: 4rem; }

/* ---- Mini phone ---- */
.mini-phone { width: 200px; height: 400px; background: #fff; border-radius: 2rem; padding: .5rem; box-shadow: 0 4px 24px rgba(0,0,0,.08); border: 1px solid hsl(var(--border)); }
.mini-screen { background: hsl(var(--bg)); border-radius: 1.5rem; overflow: hidden; height: 100%; display: flex; flex-direction: column; }

/* ---- Dashboard mockup ---- */
.dash-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; padding: .75rem; gap: .75rem; }
.dash-welcome h3 { font-weight: 600; color: hsl(var(--fg)); font-size: 12px; }
.dash-welcome p { font-size: 9px; color: hsl(var(--muted)); }
.dash-url { background: hsl(var(--secondary)); border-radius: 8px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; }
.dash-url .dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.dash-url span { font-size: 8px; font-weight: 500; color: hsl(var(--fg)); }
.dash-progress .label-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.dash-progress .label-row span:first-child { font-size: 10px; font-weight: 600; color: hsl(var(--fg)); }
.dash-progress .label-row span:last-child { font-size: 9px; color: hsl(var(--muted)); }
.dash-bar { height: 6px; background: hsl(var(--secondary)); border-radius: 9999px; overflow: hidden; }
.dash-bar-fill { height: 100%; background: hsl(var(--primary)); border-radius: 9999px; width: 66%; }
.dash-checklist { display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.dash-item { display: flex; align-items: center; gap: 10px; background: hsl(var(--secondary) / .6); border-radius: 12px; padding: 10px; }
.dash-item .check { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.dash-item .check.done { background: hsl(var(--primary)); display: flex; align-items: center; justify-content: center; }
.dash-item .check.done::after { content: '✓'; color: #fff; font-size: 8px; font-weight: 700; }
.dash-item .check.pending { border: 2px solid hsl(var(--muted) / .3); }
.dash-item span { font-size: 10px; color: hsl(var(--fg)); }
.dash-item span.done-text { color: hsl(var(--muted)); text-decoration: line-through; }
.dash-cta { background: hsl(var(--primary)); border-radius: 8px; padding: 8px; text-align: center; }
.dash-cta span { font-size: 10px; font-weight: 600; color: #fff; }

/* ---- Instagram mockup ---- */
.ig-header { padding: 8px 12px; border-bottom: 1px solid hsl(var(--border)); flex-shrink: 0; font-size: 12px; font-weight: 600; color: hsl(var(--fg)); }
.ig-content { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow: hidden; }
.ig-profile-row { display: flex; align-items: center; gap: 12px; }
.ig-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; outline: 2px solid hsl(var(--primary) / .2); outline-offset: 2px; }
.ig-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ig-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
.ig-stats .num { font-size: 12px; font-weight: 700; color: hsl(var(--fg)); }
.ig-stats .lbl { font-size: 8px; color: hsl(var(--muted)); }
.ig-bio { display: flex; flex-direction: column; gap: 2px; }
.ig-bio .name { font-size: 10px; font-weight: 600; color: hsl(var(--fg)); }
.ig-bio .desc { font-size: 10px; color: hsl(var(--muted)); }
.ig-bio .link { font-size: 10px; color: hsl(var(--primary)); font-weight: 500; }
.ig-actions { display: flex; gap: 6px; }
.ig-actions .follow { flex: 1; background: hsl(var(--primary)); border-radius: 6px; padding: 6px; text-align: center; font-size: 10px; font-weight: 600; color: #fff; }
.ig-actions .msg { flex: 1; background: hsl(var(--secondary)); border-radius: 6px; padding: 6px; text-align: center; font-size: 10px; font-weight: 600; color: hsl(var(--fg)); }
.ig-tabs { display: flex; justify-content: space-around; border-top: 1px solid hsl(var(--border)); padding-top: 8px; }
.ig-tabs div { width: 16px; height: 16px; background: hsl(var(--muted) / .2); border-radius: 2px; }
.ig-tabs div:first-child { background: hsl(var(--fg) / .15); }
.ig-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-posts div { aspect-ratio: 1; background: hsl(var(--secondary)); border-radius: 2px; }

/* ---- Features ---- */
.features-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media(min-width:640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card { background: #fff; border-radius: 1rem; padding: 1.5rem; transition: box-shadow .2s; }
.feature-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: hsl(var(--primary) / .1); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature-icon svg { width: 20px; height: 20px; color: hsl(var(--primary)); stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.feature-card h3 { font-size: 1rem; font-weight: 600; color: hsl(var(--fg)); margin-bottom: .375rem; }
.feature-card p { font-size: .875rem; color: hsl(var(--muted)); line-height: 1.6; }

/* ---- Pricing ---- */
.pricing-grid { display: grid; gap: 2rem; max-width: 800px; margin: 0 auto; }
@media(min-width:768px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
.price-card { border-radius: 1rem; padding: 2rem; border: 1px solid hsl(var(--border)); background: #fff; }
.price-card.highlighted { border: 2px solid hsl(var(--primary)); box-shadow: 0 0 32px hsl(var(--primary) / .15); }
.price-badge { display: inline-block; background: hsl(var(--primary)); color: #fff; font-size: .75rem; font-weight: 600; padding: .25rem .75rem; border-radius: 9999px; margin-bottom: 1rem; }
.price-card h3 { font-size: 1.5rem; font-weight: 700; color: hsl(var(--fg)); margin-bottom: .5rem; }
.price-card .desc { color: hsl(var(--muted)); margin-bottom: 1rem; }
.price-amount { font-size: 2.5rem; font-weight: 700; color: hsl(var(--fg)); }
.price-period { color: hsl(var(--muted)); margin-left: .25rem; }
.price-features { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.price-features li { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .75rem; font-size: .875rem; color: hsl(var(--fg)); }
.price-features li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.price-features li svg.highlight { color: hsl(var(--primary)); }
.price-features li svg.muted { color: hsl(var(--muted)); }

/* ---- FAQ ---- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid hsl(var(--border)); }
.faq-question { width: 100%; background: none; text-align: left; padding: 1.25rem 0; font-size: 1rem; font-weight: 600; color: hsl(var(--fg)); display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-family: inherit; }
.faq-question .chevron { transition: transform .2s; font-size: 1.25rem; color: hsl(var(--muted)); }
.faq-item.open .chevron { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: hsl(var(--muted)); line-height: 1.7; font-size: .9375rem; }
.faq-answer-inner { padding-bottom: 1.25rem; }
.faq-item.open .faq-answer { max-height: 400px; }

/* ---- CTA Banner ---- */
.cta-banner { max-width: 960px; margin: 0 auto; border-radius: 1.5rem; padding: 2rem; text-align: center; position: relative; overflow: hidden; }
@media(min-width:768px) { .cta-banner { padding: 4rem; } }
.cta-banner-bg { position: absolute; inset: 0; background: radial-gradient(circle at 30% 70%, hsl(35 90% 65% / .3), transparent 50%); }
.cta-banner h2 { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 1rem; position: relative; z-index: 1; }
@media(min-width:768px) { .cta-banner h2 { font-size: 3rem; } }
.cta-banner p { color: rgba(255,255,255,.8); font-size: 1.125rem; margin-bottom: 2rem; max-width: 36rem; margin-left: auto; margin-right: auto; position: relative; z-index: 1; }

/* ---- Footer ---- */
.footer { border-top: 1px solid hsl(var(--border)); padding: 2rem 1.5rem; }
.footer-inner { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
@media(min-width:640px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-logo { display: flex; align-items: center; gap: .5rem; }
.footer-logo img { height: 24px; width: 24px; border-radius: 50%; }
.footer-logo span { font-weight: 600; color: hsl(var(--fg)); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; font-size: .875rem; }
@media(min-width:640px) { .footer-links { justify-content: flex-end; } }
.footer-links a { color: hsl(var(--muted)); transition: color .2s; }
.footer-links a:hover { color: hsl(var(--fg)); }
.footer-links .copy { color: hsl(var(--muted)); }

/* ---- Mobile tweaks ---- */
@media(max-width:400px) {
  /* Hide "Free" on very small screens so nav pill doesn't overflow */
  .nav-cta-extra { display: none; }

  /* Full-width hero CTA */
  .hero-text .btn-white { width: 100%; justify-content: center; }

  /* Full-width final CTA button */
  .cta-banner .btn-white { width: 100%; }
}

/* Scale phone wrap to fit on narrower screens */
@media(max-width:479px) { .phone-wrap { transform: scale(.58); } }
@media(max-width:360px) { .phone-wrap { transform: scale(.50); } }

/* ---- SVG icon helpers ---- */
svg.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
svg.icon-sm { width: 14px; height: 14px; }

/* ---- Blog/Article pages ---- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

/* Article hero header */
.article-hero { background: hsl(var(--secondary)); border-bottom: 1px solid hsl(var(--border)); padding: 3rem 1.5rem 2.5rem; }
.article-hero-inner { max-width: 1060px; margin: 0 auto; }

.article-breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: hsl(var(--muted)); margin-bottom: 1.25rem; flex-wrap: wrap; }
.article-breadcrumb a { color: hsl(var(--muted)); transition: color .2s; }
.article-breadcrumb a:hover { color: hsl(var(--primary)); }
.article-breadcrumb span { color: hsl(var(--muted)); }

.article-tags-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }

.article-h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15; color: hsl(var(--fg)); margin-bottom: 1rem; }
.article-lead { font-size: 1.125rem; color: hsl(var(--muted)); line-height: 1.7; margin-bottom: 1.75rem; max-width: 640px; }

.article-byline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.byline-left { display: flex; align-items: center; gap: .875rem; }
.hero-share-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 1px solid hsl(var(--border)); color: hsl(var(--muted)); cursor: pointer; transition: color .15s, background .15s; flex-shrink: 0; }
.hero-share-btn:hover { color: hsl(var(--fg)); background: hsl(var(--border) / .5); }
@media(min-width:900px) { .hero-share-btn { display: none; } }
.article-avatar { width: 40px; height: 40px; border-radius: 50%; background: hsl(var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; text-transform: uppercase; }
.article-author { font-size: .9rem; font-weight: 600; color: hsl(var(--fg)); }
.article-meta-row { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: hsl(var(--muted)); flex-wrap: wrap; margin-top: 2px; }

/* Two-column layout: TOC left | article right */
.article-main { padding: 3rem 1.5rem 4rem; background: #fff; }
.article-layout { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: 240px 1fr; gap: 4rem; }
.article-layout-notoc { grid-template-columns: 1fr; max-width: 720px; }
@media(max-width: 900px) { .article-layout { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Article body typography */
.article-body { color: hsl(var(--fg)); line-height: 1.8; min-width: 0; }
.article-body h2 { font-size: 1.5rem; font-weight: 700; color: hsl(var(--fg)); margin: 2.75rem 0 .875rem; padding-bottom: .5rem; border-bottom: 2px solid hsl(var(--border)); scroll-margin-top: 5rem; }
.article-body h3 { font-size: 1.125rem; font-weight: 600; color: hsl(var(--fg)); margin: 2rem 0 .5rem; scroll-margin-top: 5rem; }
.article-body p { margin-bottom: 1.35rem; font-size: 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1.35rem 1.5rem; }
.article-body li { margin-bottom: .5rem; line-height: 1.7; }
.article-body a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { opacity: .8; }
.article-body strong { font-weight: 700; color: hsl(var(--fg)); }
.article-body em { font-style: italic; }
.article-body blockquote { border-left: 3px solid hsl(var(--primary)); margin: 1.75rem 0; padding: .75rem 1.25rem; background: hsl(var(--primary) / .05); border-radius: 0 var(--radius) var(--radius) 0; color: hsl(var(--muted)); font-style: italic; }
.article-body hr { border: none; border-top: 1px solid hsl(var(--border)); margin: 2.5rem 0; }
.article-body code { background: hsl(var(--secondary)); padding: 2px 6px; border-radius: 4px; font-size: .875em; font-family: ui-monospace, monospace; }
.article-body pre { background: hsl(var(--fg)); color: hsl(var(--bg)); border-radius: var(--radius); padding: 1.25rem; overflow-x: auto; margin-bottom: 1.35rem; }
.article-body pre code { background: none; padding: 0; font-size: .875rem; }
.article-body img { border-radius: var(--radius); margin: 1.5rem 0; }

.article-end { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid hsl(var(--border)); display: flex; flex-direction: column; gap: 1.25rem; }
.article-end-tags { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .875rem; color: hsl(var(--muted)); }

/* Sidebar (left column) — wrapper stretches to grid row height, inner div is sticky */
.article-toc-wrap { min-width: 0; }
.article-sidebar-inner {
  position: sticky; top: 5rem;
  max-height: calc(100vh - 6rem); overflow-y: auto;
  display: flex; flex-direction: column; gap: 1rem;
  scrollbar-width: thin;
}
@media(max-width:900px) { .article-sidebar-inner { position: static; max-height: none; } }

/* TOC card */
.article-toc {
  background: hsl(var(--secondary)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 1.25rem; flex-shrink: 0;
}
.toc-heading { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: hsl(var(--muted)); margin-bottom: .875rem; }
.article-toc #TableOfContents ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.article-toc #TableOfContents ul ul { padding-left: .875rem; margin-top: 2px; }
.article-toc #TableOfContents a { display: block; font-size: .825rem; color: hsl(var(--muted)); padding: .3rem .5rem; border-radius: .375rem; transition: color .15s, background .15s; line-height: 1.4; text-decoration: none; }
.article-toc #TableOfContents a:hover { color: hsl(var(--fg)); background: hsl(var(--border) / .6); }
.article-toc #TableOfContents a.toc-active { color: hsl(var(--primary)); background: hsl(var(--primary) / .08); font-weight: 600; border-left: 2px solid hsl(var(--primary)); padding-left: .375rem; }

/* Share widget — hidden on mobile (hero share button used instead) */
@media(max-width:900px) { .article-share { display: none; } }
.article-share {
  background: hsl(var(--secondary)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 1rem 1.25rem; flex-shrink: 0;
}
.share-heading { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: hsl(var(--muted)); margin-bottom: .625rem; }
.share-icons { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.share-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: .5rem; color: hsl(var(--muted)); background: #fff; border: 1px solid hsl(var(--border)); transition: color .15s, background .15s; cursor: pointer; text-decoration: none; font-family: inherit; flex-shrink: 0; }
.share-icon:hover { color: hsl(var(--fg)); background: hsl(var(--border) / .6); }
.share-icon#copyLinkBtn.copied { color: hsl(var(--primary)); }

/* Inline author card (inside article column) */
.article-author-card { display: flex; align-items: flex-start; gap: 1rem; margin-top: 3rem; padding: 1.5rem; background: hsl(var(--secondary)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); }
@media(max-width:480px) { .article-author-card { flex-direction: column; align-items: center; text-align: center; } }
.author-card-avatar { width: 52px; height: 52px; border-radius: 50%; background: hsl(var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; flex-shrink: 0; text-transform: uppercase; }
.author-card-name { font-size: .95rem; font-weight: 700; color: hsl(var(--fg)); }
.author-card-role { font-size: .8rem; color: hsl(var(--primary)); font-weight: 500; margin-bottom: .5rem; }
.author-card-bio { font-size: .875rem; color: hsl(var(--muted)); line-height: 1.65; margin: 0; }

/* Related articles */
.related-section { background: #fff; border-top: 1px solid hsl(var(--border)); padding: 3.5rem 1.5rem 5rem; }
.related-inner { max-width: 1060px; margin: 0 auto; }
.related-heading { font-size: 1.25rem; font-weight: 700; color: hsl(var(--fg)); margin-bottom: 2rem; }
.related-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media(min-width:640px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:900px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.related-card { display: block; background: hsl(var(--secondary)); border: 1px solid hsl(var(--border)); border-radius: 1rem; padding: 1.5rem; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.related-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); transform: translateY(-2px); }
.related-card-tags { margin-bottom: .625rem; }
.related-card-title { font-size: 1rem; font-weight: 700; color: hsl(var(--fg)); line-height: 1.35; margin-bottom: .5rem; }
.related-card-desc { font-size: .85rem; color: hsl(var(--muted)); line-height: 1.6; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-meta { display: flex; align-items: center; gap: .375rem; font-size: .78rem; color: hsl(var(--muted)); }

/* Blog list page */
.btn-secondary { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .875rem; color: hsl(var(--fg)); border: 1px solid hsl(var(--border)); padding: .5rem 1rem; border-radius: var(--radius); transition: background .2s; }
.btn-secondary:hover { background: hsl(var(--secondary)); }
.page-header { padding: 3rem 0 2rem; }
.page-header h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; color: hsl(var(--fg)); margin-bottom: .5rem; }
.page-header p { color: hsl(var(--muted)); font-size: 1.1rem; }
.posts-grid { display: grid; gap: 1.5rem; padding: 2rem 0 5rem; }
@media(min-width:640px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1024px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { background: #fff; border: 1px solid hsl(var(--border)); border-radius: 1rem; overflow: hidden; transition: box-shadow .2s; }
.post-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.post-card a { display: block; padding: 1.5rem; }
.post-meta { display: flex; align-items: center; gap: .75rem; font-size: .8rem; color: hsl(var(--muted)); margin-bottom: .75rem; }
.post-card h2 { font-size: 1.05rem; font-weight: 700; color: hsl(var(--fg)); line-height: 1.3; margin-bottom: .375rem; }
.post-card p { font-size: .875rem; color: hsl(var(--muted)); line-height: 1.5; margin-bottom: .75rem; }
.read-more { font-size: .875rem; font-weight: 600; color: hsl(var(--primary)); }

/* Legal pages */
.legal-hero .article-h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.legal-updated { font-size: .875rem; color: hsl(var(--muted)); margin-top: .5rem; }
.legal-main { background: #fff; padding: 3rem 1.5rem 5rem; }
.legal-body { max-width: 720px; margin: 0 auto; color: hsl(var(--fg)); line-height: 1.8; }
.legal-body h2 { font-size: 1.1rem; font-weight: 700; color: hsl(var(--fg)); margin: 2.5rem 0 .75rem; padding-bottom: .375rem; border-bottom: 1px solid hsl(var(--border)); }
.legal-body p { margin-bottom: 1.25rem; font-size: .9375rem; }
.legal-body ul, .legal-body ol { margin: 0 0 1.25rem 1.5rem; }
.legal-body li { margin-bottom: .375rem; font-size: .9375rem; line-height: 1.7; }
.legal-body strong { font-weight: 600; color: hsl(var(--fg)); }
.legal-body a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { opacity: .8; }
.tag { font-size: .75rem; font-weight: 500; color: hsl(var(--primary)); background: hsl(var(--primary) / .1); padding: 2px 8px; border-radius: 9999px; }
