/* IT Wala Dai — blog (listing + article pages generated by server/lib/blog.mjs) */
.itwd-blog {
  --b-green: var(--itwd-green, #1CB098);
  --b-yellow: var(--itwd-yellow, #FFBF00);
  --b-dark: var(--title-color, #1E1E1E);
  --b-body: var(--body-color, #556377);
  --b-line: #E6EDEB;
  --b-soft: #F3FAF8;
  --b-radius: 20px;
  color: var(--b-body);
}
.itwd-blog a { text-decoration: none; }
.itwd-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px;
  color: var(--b-green); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.itwd-kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--b-yellow); }

/* breadcrumbs */
.itwd-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 14px; }
.itwd-crumbs li { display: inline-flex; align-items: center; gap: 6px; color: var(--b-body); }
.itwd-crumbs li + li::before { content: "/"; opacity: .45; }
.itwd-crumbs a { color: var(--b-body); font-weight: 600; }
.itwd-crumbs a:hover { color: var(--b-green); }
.itwd-crumbs [aria-current] { max-width: 46ch; overflow: hidden; color: var(--b-dark); text-overflow: ellipsis; white-space: nowrap; }

/* chips, avatar */
.itwd-chip {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px;
  background: rgba(28, 176, 152, .1); color: var(--b-green); font-size: 13px; font-weight: 700; line-height: 1.2;
}
.itwd-chip:hover { background: var(--b-green); color: #fff; }
.itwd-chip--light { margin-bottom: 18px; background: #fff; box-shadow: 0 6px 18px rgba(30, 65, 59, .08); }
.itwd-avatar {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--b-green), #12866f); color: #fff; font-size: 13px; font-weight: 800;
}
.itwd-avatar--lg { width: 64px; height: 64px; font-size: 22px; }

/* ---------------------------------------------------------------- listing */
.itwd-blog-hero {
  position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 56px);
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 191, 0, .14), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(28, 176, 152, .16), transparent 32%),
    linear-gradient(180deg, #F4FCF9 0%, #fff 100%);
}
.itwd-blog-hero__title { margin: 0 0 14px; color: var(--b-dark); font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.itwd-blog-hero__title small { color: var(--b-body); font-size: .45em; font-weight: 600; letter-spacing: 0; }
.itwd-blog-hero__lead { max-width: 660px; margin: 0 0 28px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.7; }
.itwd-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.itwd-cats a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--b-line); border-radius: 999px;
  background: #fff; color: var(--b-dark); font-size: 14px; font-weight: 600; transition: .2s;
}
.itwd-cats a span { color: var(--b-body); font-size: 12px; font-weight: 700; }
.itwd-cats a:hover { border-color: var(--b-green); color: var(--b-green); }
.itwd-cats a.is-active { border-color: var(--b-dark); background: var(--b-dark); color: #fff; }
.itwd-cats a.is-active span { color: var(--b-yellow); }

.itwd-blog-list { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
.itwd-bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.itwd-bcard--featured + .itwd-bgrid { margin-top: 28px; }

.itwd-bcard {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--b-line); border-radius: var(--b-radius);
  background: #fff; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.itwd-bcard:hover { transform: translateY(-4px); border-color: rgba(28, 176, 152, .35); box-shadow: 0 22px 48px rgba(30, 65, 59, .1); }
.itwd-bcard__media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--b-soft); }
.itwd-bcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.itwd-bcard:hover .itwd-bcard__media img { transform: scale(1.04); }
.itwd-card-ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: radial-gradient(circle at 25% 25%, rgba(255, 191, 0, .35), transparent 40%), linear-gradient(135deg, #1CB098, #0E6B5A);
  color: rgba(255, 255, 255, .92); font-size: 56px; font-weight: 800; letter-spacing: -.04em;
}
.itwd-bcard__body { display: flex; flex: 1; flex-direction: column; padding: 22px 24px 24px; }
.itwd-bcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.itwd-bcard__title { margin: 0 0 10px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.itwd-bcard__title a { color: var(--b-dark); background: linear-gradient(var(--b-yellow), var(--b-yellow)) 0 100% / 0 3px no-repeat; transition: background-size .3s; }
.itwd-bcard:hover .itwd-bcard__title a { background-size: 100% 3px; }
.itwd-bcard__excerpt { display: -webkit-box; margin: 0 0 20px; overflow: hidden; font-size: 15px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.itwd-bcard__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--b-line); color: var(--b-dark); font-size: 14px; font-weight: 600; }
.itwd-bcard__foot time { margin-left: auto; color: var(--b-body); font-weight: 500; }

.itwd-bcard--featured { display: grid; grid-template-columns: 1.25fr 1fr; }
.itwd-bcard--featured .itwd-bcard__media { aspect-ratio: auto; min-height: 340px; }
.itwd-bcard--featured .itwd-bcard__body { justify-content: center; padding: clamp(26px, 4vw, 48px); }
.itwd-bcard--featured .itwd-bcard__title { font-size: clamp(24px, 2.6vw, 34px); }
.itwd-bcard--featured .itwd-bcard__excerpt { font-size: 16px; -webkit-line-clamp: 4; }

.itwd-blog-empty { padding: 56px 24px; border: 2px dashed var(--b-line); border-radius: var(--b-radius); text-align: center; }
.itwd-blog-empty h2 { color: var(--b-dark); font-size: 26px; }
.itwd-blog-empty a { color: var(--b-green); font-weight: 700; }

.itwd-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; }
.itwd-pager a, .itwd-pager span {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 16px; border: 1px solid var(--b-line);
  border-radius: 999px; background: #fff; color: var(--b-dark); font-weight: 700;
}
.itwd-pager a:hover { border-color: var(--b-green); color: var(--b-green); }
.itwd-pager .is-current { border-color: var(--b-green); background: var(--b-green); color: #fff; }
.itwd-pager .is-off { opacity: .4; }

/* CTA band */
.itwd-blog-cta { padding: 0 0 clamp(56px, 7vw, 96px); }
.itwd-blog-cta__box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(28px, 5vw, 56px);
  border-radius: 28px; background: radial-gradient(circle at 90% 10%, rgba(255, 191, 0, .25), transparent 35%), var(--b-dark); color: rgba(255, 255, 255, .78);
}
.itwd-blog-cta__box h2 { margin: 0 0 8px; color: #fff; font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.itwd-blog-cta__box p { max-width: 560px; margin: 0; }
.itwd-blog-cta__box .itwd-kicker { color: var(--b-yellow); }
.itwd-blog-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.itwd-blog-cta__actions .th-btn { background: var(--b-yellow); color: var(--b-dark); }
.itwd-link { color: #fff; font-weight: 700; }
.itwd-link:hover { color: var(--b-yellow); }

/* ---------------------------------------------------------------- article */
.itwd-progress { position: fixed; top: 0; left: 0; z-index: 9999; width: 100%; height: 4px; pointer-events: none; }
.itwd-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--b-green), var(--b-yellow)); transform: scaleX(0); transform-origin: 0 50%; }

.itwd-post-hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(110px, 12vw, 160px);
  background:
    radial-gradient(circle at 6% 30%, rgba(255, 191, 0, .14), transparent 26%),
    radial-gradient(circle at 95% 0%, rgba(28, 176, 152, .18), transparent 34%),
    linear-gradient(180deg, #F4FCF9 0%, #EEF8F5 100%);
}
.itwd-post-hero .container { max-width: 900px; }
.itwd-post-title { margin: 0 0 18px; color: var(--b-dark); font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; text-wrap: balance; }
.itwd-post-lead { margin: 0 0 26px; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.7; }
.itwd-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; color: var(--b-body); font-size: 15px; }
.itwd-post-meta strong { color: var(--b-dark); }
.itwd-post-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

.itwd-post-cover { max-width: 1140px; margin: calc(-1 * clamp(80px, 10vw, 120px)) auto 0; overflow: hidden; border-radius: 28px; box-shadow: 0 30px 70px rgba(30, 65, 59, .16); background: #fff; }
.itwd-post-cover img { display: block; width: 100%; height: auto; max-height: 600px; object-fit: cover; }
.itwd-post-cover + .itwd-post-layout { margin-top: clamp(36px, 5vw, 64px); }
.itwd-post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 72px); max-width: 1140px; margin: calc(-1 * clamp(60px, 8vw, 100px)) auto 0; }
.itwd-post-main { min-width: 0; padding: 0; }
.itwd-post-cover ~ .itwd-post-layout .itwd-post-main { padding: 0; }
.itwd-post-layout:first-child .itwd-post-main,
.itwd-post-hero + .container > .itwd-post-layout:first-child .itwd-post-main { padding: clamp(24px, 4vw, 44px); border-radius: 28px; background: #fff; box-shadow: 0 24px 60px rgba(30, 65, 59, .08); }

/* prose */
.itwd-prose { color: #3F4B5B; font-size: 18px; line-height: 1.85; }
.itwd-prose > * + * { margin-top: 1.25em; }
.itwd-prose p { margin: 0; }
.itwd-prose p + p { margin-top: 1.25em; }
.itwd-prose h2, .itwd-prose h3, .itwd-prose h4 { margin: 2em 0 .6em; color: var(--b-dark); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; scroll-margin-top: 110px; }
.itwd-prose h2 { padding-top: .2em; font-size: clamp(26px, 2.6vw, 32px); }
.itwd-prose h3 { font-size: clamp(21px, 2vw, 24px); }
.itwd-prose h4 { font-size: 19px; }
.itwd-prose > :first-child { margin-top: 0; }
.itwd-prose a { color: #0F8C77; font-weight: 600; background: linear-gradient(rgba(28, 176, 152, .25), rgba(28, 176, 152, .25)) 0 100% / 100% 2px no-repeat; }
.itwd-prose a:hover { color: var(--b-dark); background-size: 100% 100%; }
.itwd-prose strong { color: var(--b-dark); }
.itwd-prose mark { padding: 0 .2em; border-radius: 4px; background: rgba(255, 191, 0, .35); color: inherit; }
.itwd-prose ul, .itwd-prose ol { margin-bottom: 0; padding-left: 1.4em; }
.itwd-prose li + li { margin-top: .45em; }
.itwd-prose li::marker { color: var(--b-green); font-weight: 700; }
.itwd-prose ul ul, .itwd-prose ol ol, .itwd-prose ul ol, .itwd-prose ol ul { margin-top: .45em; }
.itwd-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--b-yellow); color: var(--b-dark); font-size: 1.1em; font-style: italic; }
.itwd-prose blockquote > * + * { margin-top: .8em; }
.itwd-prose hr { width: 120px; margin: 2.4em auto; border: 0; border-top: 3px dotted var(--b-line); opacity: 1; }
.itwd-prose img { max-width: 100%; height: auto; border-radius: 16px; }
.itwd-prose figure { margin: 2em 0; }
.itwd-prose figcaption { margin-top: 10px; color: var(--b-body); font-size: 14px; text-align: center; }
.itwd-prose code { padding: .15em .4em; border-radius: 6px; background: #F1F5F4; color: #C7254E; font-size: .86em; }
.itwd-prose pre {
  position: relative; margin: 1.6em 0; padding: 22px 22px 20px; overflow-x: auto; border-radius: 16px; background: #0F1720;
  color: #E6EDF3; font-size: 15px; line-height: 1.7; tab-size: 4;
}
.itwd-prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 14px; color: #7D8B99; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.itwd-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.itwd-table { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--b-line); border-radius: 16px; }
.itwd-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.itwd-table th { background: var(--b-soft); color: var(--b-dark); font-weight: 800; text-align: left; }
.itwd-table th, .itwd-table td { padding: 14px 18px; border-bottom: 1px solid var(--b-line); }
.itwd-table tr:last-child td { border-bottom: 0; }
.itwd-table tbody tr:nth-child(even) { background: #FBFDFC; }
.itwd-embed { position: relative; margin: 1.8em 0; overflow: hidden; border-radius: 16px; aspect-ratio: 16 / 9; background: #000; }
.itwd-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.itwd-callout { margin: 1.8em 0; padding: 20px 24px; border: 1px solid rgba(28, 176, 152, .25); border-radius: 16px; background: var(--b-soft); font-size: 17px; }
.itwd-callout > * + * { margin-top: .7em; }
.itwd-callout__title { margin: 0; color: var(--b-dark); font-weight: 800; }
.itwd-callout__title::before { content: "💡 "; }
.itwd-callout--note .itwd-callout__title::before, .itwd-callout--info .itwd-callout__title::before { content: "ℹ️ "; }
.itwd-callout--warning { border-color: rgba(255, 150, 0, .35); background: #FFF8E6; }
.itwd-callout--warning .itwd-callout__title::before { content: "⚠️ "; }
.itwd-callout--important { border-color: rgba(220, 53, 69, .25); background: #FFF4F5; }
.itwd-callout--important .itwd-callout__title::before { content: "❗ "; }

/* table of contents */
.itwd-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.itwd-toc li { margin: 0; }
.itwd-toc li.lvl-3 { padding-left: 16px; }
.itwd-toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--b-line); color: var(--b-body); font-size: 14.5px; font-weight: 500; line-height: 1.45; transition: .15s; }
.itwd-toc a:hover { color: var(--b-dark); }
.itwd-toc a.is-active { border-left-color: var(--b-green); color: var(--b-green); font-weight: 700; }
.itwd-toc__title { margin: 0 0 12px; color: var(--b-dark); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.itwd-toc--inline { display: none; margin-bottom: 28px; padding: 16px 20px; border: 1px solid var(--b-line); border-radius: 16px; background: var(--b-soft); }
.itwd-toc--inline summary { color: var(--b-dark); font-weight: 800; cursor: pointer; }
.itwd-toc--inline[open] summary { margin-bottom: 12px; }

.itwd-post-side { position: relative; }
.itwd-post-side > * { position: sticky; top: 110px; }
.itwd-post-side > * + * { position: static; margin-top: 28px; }
.itwd-toc--side { max-height: calc(100vh - 380px); overflow-y: auto; padding-right: 6px; }
.itwd-toc--side + .itwd-side-cta { position: sticky; top: calc(100vh - 290px); }
.itwd-side-cta { padding: 26px; border-radius: 22px; background: radial-gradient(circle at 100% 0, rgba(255, 191, 0, .3), transparent 45%), var(--b-dark); color: rgba(255, 255, 255, .75); font-size: 15px; }
.itwd-side-cta .itwd-kicker { color: var(--b-yellow); font-size: 11px; }
.itwd-side-cta__title { margin: 0 0 8px; color: #fff; font-size: 21px; font-weight: 800; line-height: 1.3; }
.itwd-side-cta .th-btn { width: 100%; margin-top: 16px; background: var(--b-yellow); color: var(--b-dark); text-align: center; }

/* FAQ, tags, share, author */
.itwd-post-faq { margin-top: 48px; }
.itwd-post-faq h2 { margin: 0 0 18px; color: var(--b-dark); font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; }
.itwd-post-faq details { margin-bottom: 12px; border: 1px solid var(--b-line); border-radius: 16px; background: #fff; transition: border-color .2s; }
.itwd-post-faq details[open] { border-color: rgba(28, 176, 152, .45); }
.itwd-post-faq summary { position: relative; padding: 18px 54px 18px 22px; color: var(--b-dark); font-size: 17px; font-weight: 700; list-style: none; cursor: pointer; }
.itwd-post-faq summary::-webkit-details-marker { display: none; }
.itwd-post-faq summary::after { content: "+"; position: absolute; top: 50%; right: 20px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--b-soft); color: var(--b-green); font-size: 20px; transform: translateY(-50%); }
.itwd-post-faq details[open] summary::after { content: "−"; }
.itwd-post-faq details > div { padding: 0 22px 18px; font-size: 16px; line-height: 1.75; }
.itwd-post-faq details > div p { margin: 0 0 .8em; }

.itwd-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.itwd-tag { padding: 6px 12px; border-radius: 8px; background: #F1F5F4; color: var(--b-dark); font-size: 13px; font-weight: 600; }
.itwd-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; padding: 18px 0; border-top: 1px solid var(--b-line); border-bottom: 1px solid var(--b-line); }
.itwd-share > span { margin-right: auto; color: var(--b-dark); font-weight: 800; }
.itwd-share a, .itwd-copy {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--b-line); border-radius: 50%;
  background: #fff; color: var(--b-dark); font-size: 16px; transition: .2s; cursor: pointer;
}
.itwd-share a:hover, .itwd-copy:hover { border-color: var(--b-green); background: var(--b-green); color: #fff; }
.itwd-copy { display: inline-flex; gap: 8px; width: auto; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.itwd-author { display: flex; gap: 20px; margin-top: 32px; padding: 26px; border-radius: 22px; background: var(--b-soft); }
.itwd-author p { margin: 0; font-size: 15px; line-height: 1.7; }
.itwd-author a { color: var(--b-green); font-weight: 700; }
.itwd-author__name { margin-bottom: 4px !important; color: var(--b-dark); font-size: 18px !important; font-weight: 800; }

.itwd-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1140px; margin: 56px auto 0; }
.itwd-postnav a { display: block; padding: 22px 24px; border: 1px solid var(--b-line); border-radius: 18px; background: #fff; transition: .2s; }
.itwd-postnav a:hover { border-color: var(--b-green); box-shadow: 0 14px 34px rgba(30, 65, 59, .08); }
.itwd-postnav span { display: block; margin-bottom: 6px; color: var(--b-green); font-size: 13px; font-weight: 700; }
.itwd-postnav strong { color: var(--b-dark); font-size: 17px; line-height: 1.4; }
.itwd-postnav .next { text-align: right; }

.itwd-related { padding: clamp(56px, 7vw, 88px) 0; }
.itwd-related h2 { margin: 0 0 28px; color: var(--b-dark); font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.itwd-blog--post .itwd-blog-cta { padding-top: 0; }
.itwd-blog--post .itwd-related + .itwd-blog-cta { padding-top: 0; }
.itwd-blog--post article + .itwd-blog-cta { padding-top: clamp(56px, 7vw, 88px); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199px) {
  .itwd-post-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 991px) {
  .itwd-bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .itwd-bcard--featured { grid-template-columns: 1fr; }
  .itwd-bcard--featured .itwd-bcard__media { min-height: 0; aspect-ratio: 16 / 9; }
  .itwd-post-layout { grid-template-columns: 1fr; }
  .itwd-post-side { display: none; }
  .itwd-toc--inline { display: block; }
}
@media (max-width: 767px) {
  .itwd-bgrid { grid-template-columns: 1fr; }
  .itwd-prose { font-size: 17px; line-height: 1.8; }
  .itwd-post-cover { border-radius: 18px; }
  .itwd-postnav { grid-template-columns: 1fr; }
  .itwd-postnav .next { text-align: left; }
  .itwd-share > span { width: 100%; }
  .itwd-author { flex-direction: column; gap: 14px; }
  .itwd-crumbs [aria-current] { max-width: 24ch; }
}
@media (prefers-reduced-motion: reduce) {
  .itwd-bcard, .itwd-bcard__media img, .itwd-bcard__title a { transition: none; }
}
@media print {
  .itwd-progress, .itwd-post-side, .itwd-share, .itwd-related, .itwd-blog-cta, .itwd-postnav, header, footer { display: none !important; }
}
