/* ============================================================
   DCX — Shared EN article styles
   ============================================================ */

:root {
  --navy:      #363f75;
  --navy-deep: #2b2b68;
  --ink:       #1A005D;
  --green:     #8EC300;
  --accent:    #5a64ad;
  --tint:      #F6F7FB;
  --rail:      #E3E6F2;
  --text:      #2a2e3f;
  --muted:     #8a90ab;
  --radius:    16px;
  --shadow-sm: 0 1px 2px rgba(20,24,50,.05), 0 6px 16px rgba(20,24,50,.07);
  --shadow-md: 0 2px 4px rgba(20,24,50,.06), 0 14px 32px rgba(20,24,50,.13);
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --content-w: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; overflow-x: hidden; color: var(--text); font-family: var(--font-body); line-height: 1.85; background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.container { width: min(1140px, 92%); margin-inline: auto; }

/* ---- HEADER ---- */
header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 3px solid var(--ink); box-shadow: 0 3px 0 var(--green); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 0; }
.brand { display: flex; flex-direction: column; line-height: 1.2; flex-shrink: 0; }
.brand img { width: 112px; }
.brand small { font-size: 10px; color: var(--navy); margin-top: 4px; }
nav.gnav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
nav.gnav a { font-size: 13px; font-weight: 700; color: var(--text); position: relative; padding: 6px 0; min-height: 44px; display: inline-flex; align-items: center; }
nav.gnav a.active { color: var(--navy); }
nav.gnav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
nav.gnav a.active:not(.btn)::after, nav.gnav a:not(.btn):hover::after { transform: scaleX(1); }
nav.gnav .btn { padding: 10px 20px; font-size: 13px; color: #fff; }
nav.gnav .btn .arr { color: var(--green); transition: transform .2s; }
nav.gnav .btn:hover { background: var(--accent); transform: translateY(-2px); }
nav.gnav .btn:hover .arr { transform: translateX(4px); }
@media(max-width:860px) { nav.gnav a:not(.btn) { display: none; } }
@media(max-width:480px) { .brand img { width: 90px; } .brand small { display: none; } nav.gnav .btn { padding: 8px 16px; font-size: 13px; } }

/* ---- HAMBURGER ---- */
.menu-btn { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .2s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media(max-width:860px) { .menu-btn { display: flex; } }
.mobile-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--rail); border-bottom: 3px solid var(--ink); box-shadow: 0 3px 0 var(--green), 0 12px 32px rgba(20,24,50,.14); z-index: 99; }
.mobile-nav.open { display: block; animation: menuSlide .22s ease; }
@keyframes menuSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-nav a { display: flex; align-items: center; padding: 0 24px; min-height: 52px; font-size: 15px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--rail); transition: background .15s, color .15s; }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: var(--tint); color: var(--navy); }
.mobile-nav a.active { color: var(--navy); border-left: 3px solid var(--green); padding-left: 21px; }
.mobile-nav .mob-cta { display: flex; margin: 14px 24px 20px; justify-content: center; border-radius: 999px; background: var(--navy-deep); color: #fff; padding: 13px 28px; font-weight: 700; font-size: 15px; min-height: 48px; align-items: center; gap: 8px; }
.mobile-nav .mob-cta:hover { background: var(--accent); }
@media(min-width:861px) { .mobile-nav { display: none !important; } }

/* ---- ARTICLE HERO ---- */
.article-hero { position: relative; overflow: hidden; min-height: min(52vh, 480px); display: flex; align-items: flex-end; color: #fff; }
.article-hero .bg { position: absolute; inset: 0; background-color: #2b2b68; background-size: cover; background-position: center; }
.article-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13,16,44,.20) 0%, rgba(13,16,44,.75) 55%, rgba(13,16,44,.93) 100%); }
.article-hero .hero-body { position: relative; z-index: 1; width: 100%; padding: clamp(32px,6vw,64px) 0 clamp(36px,5vw,56px); }
.article-hero .hero-body > * { max-width: var(--content-w); }
.breadcrumb ol { display: flex; gap: 6px; align-items: center; margin-bottom: 18px; font-size: 12px; color: rgba(255,255,255,.6); list-style: none; padding: 0; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after { content: "›"; color: rgba(255,255,255,.35); }
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: #fff; }
.article-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tag-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11px; font-family: var(--font-mono); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tag-wms         { background: rgba(54,63,117,.3);   color: #b8bdea; border: 1px solid rgba(54,63,117,.5); }
.tag-fulfillment { background: rgba(90,100,173,.3);  color: #c0c5f0; border: 1px solid rgba(90,100,173,.5); }
.tag-shopify     { background: rgba(142,195,0,.25);  color: #d4f08a; border: 1px solid rgba(142,195,0,.4); }
.tag-overseas    { background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.28); }
.art-date { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.65); letter-spacing: .08em; }
.article-hero h1 { margin: 0; font-size: clamp(22px,3.8vw,40px); font-weight: 900; letter-spacing: -.01em; line-height: 1.35; text-wrap: balance; }

/* ---- LAYOUT ---- */
.article-layout { display: grid; grid-template-columns: var(--content-w) 1fr; gap: 52px; align-items: start; padding: clamp(40px,6vw,72px) 0 clamp(60px,8vw,100px); }
@media(max-width:1100px) { .article-layout { grid-template-columns: 1fr; gap: 0; } }

/* ---- SIDEBAR ---- */
.sidebar { position: sticky; top: 110px; }
@media(max-width:1100px) { .sidebar { display: none; } }
.toc-box { background: var(--tint); border-radius: var(--radius); border: 1px solid var(--rail); padding: 22px 24px; margin-bottom: 28px; }
.toc-box h4 { margin: 0 0 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.toc-box h4::before { content: ""; flex: 1; height: 1px; background: var(--rail); }
.toc-list { margin: 0; padding: 0; list-style: none; max-height: min(380px, calc(55vh - 160px)); overflow-y: auto; }
.toc-list li { margin: 0; padding: 0; border: none; }
.toc-list li::before { display: none; }
.toc-list a { display: block; padding: 8px 0; font-size: 13px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--rail); transition: color .2s, padding-left .2s; line-height: 1.5; }
.toc-list a:hover, .toc-list a.active { color: var(--navy); padding-left: 6px; }
.toc-list a.active { font-weight: 700; border-left: 3px solid var(--green); }
.toc-list li:last-child a { border-bottom: none; }
.toc-list .toc-sub a { font-size: 12px; padding-left: 12px; color: var(--muted); }
.toc-list .toc-sub a:hover, .toc-list .toc-sub a.active { color: var(--navy); padding-left: 18px; }
.sidebar-cta { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); border-radius: var(--radius); padding: 24px 22px; color: #fff; text-align: center; box-shadow: var(--shadow-sm); }
.sidebar-cta img { width: 90px; margin: 0 auto 14px; filter: brightness(0) invert(1); opacity: .9; }
.sidebar-cta h4 { margin: 0 0 10px; font-size: 16px; font-weight: 900; color: #fff; }
.sidebar-cta p { margin: 0 0 18px; font-size: 13px; color: #dde0f0; line-height: 1.7; }
.sidebar-cta .btn-sm { display: block; padding: 11px 20px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); border-radius: 999px; margin-bottom: 10px; transition: background .2s; }
.sidebar-cta .btn-sm:hover { background: rgba(255,255,255,.25); }
.sidebar-cta .btn-sm .arr { color: var(--green); margin-left: 4px; display: inline-block; transition: transform .2s; }
.sidebar-cta .btn-sm:hover .arr { transform: translateX(4px); }
.sidebar-cta .btn-sm.primary { background: var(--green); border-color: var(--green); color: #1a2600; }
.sidebar-cta .btn-sm.primary:hover { background: #a0d900; }

/* ---- MOBILE TOC BAR ---- */
.mobile-toc { display: none; position: sticky; top: 65px; z-index: 89; background: #fff; border-bottom: 1px solid var(--rail); box-shadow: 0 2px 8px rgba(20,24,50,.06); }
.mobile-toc-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; user-select: none; }
.mobile-toc-trigger .toc-icon { width: 28px; height: 28px; flex-shrink: 0; background: var(--navy); border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.mobile-toc-trigger .toc-current { flex: 1; font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-toc-trigger .toc-chevron { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); transition: transform .25s; }
.mobile-toc.open .toc-chevron { transform: rotate(180deg); }
.mobile-toc-progress { height: 3px; background: var(--rail); overflow: hidden; }
.mobile-toc-progress-fill { height: 100%; width: 0%; background: linear-gradient(to right, var(--navy), var(--green)); transition: width .2s; }
.mobile-toc-panel { display: none; border-top: 1px solid var(--rail); padding: 8px 0 16px; max-height: 60vh; overflow-y: auto; }
.mobile-toc.open .mobile-toc-panel { display: block; }
.mobile-toc-panel a { display: block; padding: 9px 4px; font-size: 14px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--rail); transition: color .2s, padding-left .15s; line-height: 1.5; }
.mobile-toc-panel a:last-child { border-bottom: none; }
.mobile-toc-panel a.sub { padding-left: 16px; font-size: 13px; color: var(--muted); }
.mobile-toc-panel a:hover { color: var(--navy); }
.mobile-toc-panel a.active { color: var(--navy); font-weight: 700; padding-left: 10px; border-left: 3px solid var(--green); }
.mobile-toc-panel a.sub.active { padding-left: 24px; }
@media(max-width:1100px) { .mobile-toc { display: block; } }
@media(max-width:480px) { .mobile-toc { top: 58px; } .mobile-toc-trigger .toc-current { font-size: 12px; } }

/* ---- ARTICLE BODY PROSE ---- */
.article-body { min-width: 0; }
.article-body p { margin: 0 0 1.2em; font-size: clamp(15px,1.3vw,16px); line-height: 2; }
.article-body p:empty { display: none; }
.article-body h2 { margin: 52px 0 20px; padding-bottom: 14px; font-size: clamp(20px,2.2vw,26px); font-weight: 900; color: var(--navy); border-bottom: 2px solid var(--rail); line-height: 1.45; text-wrap: balance; }
.article-body h2::before { content: ""; display: inline-block; width: 4px; height: 1.1em; background: var(--green); border-radius: 2px; margin-right: 12px; vertical-align: middle; margin-top: -2px; }
.article-body h3 { margin: 32px 0 12px; font-size: clamp(16px,1.7vw,19px); font-weight: 700; color: var(--navy); line-height: 1.45; text-wrap: balance; }

/* Top-level lists */
.article-body ul, .article-body ol { margin: 0 0 1.4em; padding: 0; list-style: none; }
.article-body > ul > li,
.article-body > ol > li,
.article-body section > ul > li,
.article-body section > ol > li { font-size: clamp(15px,1.3vw,16px); line-height: 2; }

/* Top-level ol */
.article-body ol { counter-reset: list; }
.article-body ol > li { position: relative; padding: 10px 0 10px 46px; border-bottom: 1px solid var(--rail); }
.article-body ol > li:last-child { border-bottom: none; }
.article-body ol > li::before { content: counter(list); counter-increment: list; position: absolute; left: 0; top: 14px; width: 30px; height: 30px; line-height: 30px; text-align: center; background: var(--navy); color: #fff; border-radius: 50%; font-family: var(--font-mono); font-size: 13px; font-weight: 700; }

/* Top-level ul */
.article-body ul > li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--rail); }
.article-body ul > li:last-child { border-bottom: none; }
.article-body ul > li::before { content: ""; position: absolute; left: 0; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* Nested ul inside ol li */
.article-body ol > li > ul { margin: 12px 0 4px; counter-reset: none; }
.article-body ol > li > ul > li { position: relative; padding: 7px 0 7px 20px; font-size: clamp(14px,1.2vw,15px); border-bottom: 1px solid rgba(227,230,242,.6); }
.article-body ol > li > ul > li:last-child { border-bottom: none; }
.article-body ol > li > ul > li::before { content: ""; position: absolute; left: 0; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); counter-increment: none; width: 7px; height: 7px; line-height: unset; text-align: unset; font-family: unset; font-size: unset; color: unset; }

/* Nested ul inside ul li (double-nested) */
.article-body ul > li > ul,
.article-body ol > li > ul > li > ul { margin: 10px 0 4px; }
.article-body ul > li > ul > li,
.article-body ol > li > ul > li > ul > li { position: relative; padding: 5px 0 5px 18px; font-size: clamp(13px,1.1vw,14px); color: var(--muted); border-bottom: none; }
.article-body ul > li > ul > li::before,
.article-body ol > li > ul > li > ul > li::before { content: ""; position: absolute; left: 0; top: 14px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.article-body strong, .article-body b { color: var(--navy); font-weight: 700; }
.article-body img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 28px 0; }

/* ---- HIGHLIGHT BOX ---- */
.highlight-box { background: var(--tint); border-left: 4px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 24px; margin: 28px 0; }
.highlight-box p { margin: 0; font-size: clamp(14px,1.2vw,15px); }
.highlight-box p + p { margin-top: .8em; }

/* ---- INLINE RELATED ("Also read") ---- */
.related-inline { display: flex; gap: 18px; align-items: center; margin: 36px 0; padding: 20px 22px; background: var(--tint); border-radius: var(--radius); border-left: 4px solid var(--green); transition: box-shadow .2s; }
.related-inline:hover { box-shadow: var(--shadow-sm); }
.related-inline .thumb { flex-shrink: 0; width: 110px; height: 72px; border-radius: 10px; overflow: hidden; }
.related-inline .thumb img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; box-shadow: none; }
.related-inline .info { flex: 1; min-width: 0; }
.related-inline .rela-label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.related-inline h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.55; }
.related-inline p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
@media(max-width:540px) { .related-inline { flex-direction: column; gap: 12px; } .related-inline .thumb { width: 100%; height: 140px; } }

/* ---- CTA NUDGE ---- */
.cta-nudge { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 0; padding: 16px 20px; border: 1px solid var(--rail); border-left: 3px solid var(--green); border-radius: 0 10px 10px 0; font-size: 14px; flex-wrap: wrap; }
.cta-nudge span { color: var(--muted); }
.cta-nudge a { font-weight: 700; color: var(--navy); white-space: nowrap; transition: color .2s; }
.cta-nudge a:hover { color: var(--accent); }

/* ---- inline body links ---- */
.article-body a:not(.related-inline):not(.cta-btn) { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(90,100,173,.35); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.article-body a:not(.related-inline):not(.cta-btn):hover { color: var(--navy); text-decoration-color: var(--navy); }

/* ---- ARTICLE CTA ---- */
.article-cta { margin: 48px 0 0; text-align: center; }
.article-cta p { margin: 0 0 24px; font-size: 15px; line-height: 1.85; }
.article-cta .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; min-height: 44px; font-size: 14px; font-weight: 700; border-radius: 999px; background: var(--navy-deep); color: #fff; border: none; transition: background .2s, transform .2s; }
.cta-btn .arr { color: var(--green); transition: transform .2s; }
.cta-btn:hover { background: var(--navy); transform: translateY(-2px); }
.cta-btn:hover .arr { transform: translateX(4px); }
.cta-btn.outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.cta-btn.outline:hover { background: var(--tint); }

/* ---- SHARE BAR ---- */
.share-bar { margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid var(--rail); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); flex-shrink: 0; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; min-height: 36px; font-size: 12px; font-weight: 700; border-radius: 999px; border: 1.5px solid var(--rail); color: var(--text); background: #fff; transition: border-color .2s, color .2s; cursor: pointer; font-family: var(--font-body); }
.share-btn:hover { border-color: var(--navy); color: var(--navy); }
.back-link { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.back-link:hover { color: var(--navy); }

/* ---- RELATED ARTICLES SECTION ---- */
.post-related { background: var(--tint); padding: clamp(44px,6vw,72px) 0; }
.post-related h3 { margin: 0 0 28px; font-size: 13px; font-weight: 700; font-family: var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.post-related h3::after { content: ""; flex: 1; height: 1px; background: var(--rail); }
.post-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--rail); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card .pt { aspect-ratio: 16/9; overflow: hidden; background: var(--tint); }
.post-card .pt img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; margin: 0; box-shadow: none; }
.post-card .pb { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.post-card .pc { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.post-card .pc span { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--accent); border: 1px solid var(--rail); }
.post-card h4 { margin: 0 0 auto; padding-bottom: 12px; flex: 1; font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .read { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent); padding-top: 12px; border-top: 1px solid var(--rail); margin-top: auto; }
.post-card .read::after { content: "→"; color: var(--green); }
@media(max-width:760px) { .post-cards { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .post-cards { grid-template-columns: 1fr; } }

/* ---- FOOTER ---- */
footer { padding: 36px 0 44px; text-align: center; font-size: 13px; border-top: 3px solid var(--ink); box-shadow: 0 -3px 0 var(--green); }
footer a { color: var(--text); border-bottom: 1px solid var(--rail); padding-bottom: 1px; }
footer img { width: 190px; margin: 22px auto 14px; }
footer small { color: var(--muted); display: block; margin-top: 6px; }

/* ---- REVEAL ---- */
[data-reveal] { opacity: 1; }
.js [data-reveal] { opacity: 0; }
.js [data-reveal].in-view { animation: revealFade .65s ease forwards; }
@keyframes revealFade { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .js [data-reveal] { opacity: 1; }
  .js [data-reveal].in-view { animation: none; }
  .post-card { transition: none; }
}
