/* ================= BLOG (/blog, /blog/<bài>): bố cục kiểu Ocoya, tiền tố .bl- =================
   Nạp sau styles.css trên mọi trang /blog/**. Chỉ dùng bảng màu hiện có:
   nền #141311, cam #FF7A1A, chữ ký #C8F751, teal #2DD4BF. Không gradient hồng→tím. */

:root {
  --bl-bg: #141311;
  --bl-card: #1b1a17;
  --bl-card-2: #221f19;
  --bl-line: #2f2b22;
  --bl-line-2: #3d382c;
  --bl-ink: #f5f5f6;
  --bl-ink-2: #cfcfd6;
  --bl-mute: #a4a4ae;
  --bl-mute-2: #7c7c86;
  --bl-orange: #ff7a1a;
  --bl-lime: #c8f751;
  --bl-teal: #2dd4bf;
}
html[data-theme="light"] {
  --bl-bg: #f7f7f8;
  --bl-card: #ffffff;
  --bl-card-2: #f1f1f4;
  --bl-line: #e4e4e9;
  --bl-line-2: #d2d2d9;
  --bl-ink: #141418;
  --bl-ink-2: #3c3c44;
  --bl-mute: #55555c;
  --bl-mute-2: #7a7a83;
}

/* hub /blog/ideas.html: 5 cột ở desktop, thu dần ở mobile (trước đây inline 5 cột tràn ở 390) */
.idea-grid { grid-template-columns: repeat(5, 1fr); }
.idea-grid .ch-tile { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .idea-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .idea-grid { grid-template-columns: repeat(2, 1fr); } }

/* hub /blog/ideas.html dùng .ch-tile của styles.css — chỉnh chữ cho theme sáng */
html[data-theme="light"] .ch-tile { color: #3c3c44; border-color: var(--bl-line); }
html[data-theme="light"] .ch-tile:hover { color: #141418; border-color: var(--bl-line-2); }

.bl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.bl-pill {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--bl-line); background: var(--bl-card); color: var(--bl-mute);
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.bl-chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--bl-line); color: var(--bl-mute); font-size: 12px; font-weight: 500;
  transition: border-color .15s, color .15s;
}
.bl-chip:hover { border-color: var(--bl-orange); color: var(--bl-ink); }

/* ---------- 1. hero danh sách ---------- */

.bl-hero { position: relative; overflow: hidden; padding: 88px 0 76px; text-align: center; }
.bl-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 640px; pointer-events: none;
  background:
    radial-gradient(42% 50% at 22% 40%, rgba(45, 212, 191, .14), transparent 70%),
    radial-gradient(46% 56% at 78% 18%, rgba(255, 122, 26, .16), transparent 70%);
  filter: blur(6px);
}
.bl-hero-in { position: relative; }
.bl-hero-art {
  position: absolute; left: -16px; top: -6px; width: 200px; height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .5));
}
.bl-hero h1 {
  max-width: 820px; margin: 20px auto 0; font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.04; letter-spacing: -.04em; color: var(--bl-ink);
}
.bl-hero p { max-width: 560px; margin: 18px auto 0; font-size: 17px; line-height: 1.6; color: var(--bl-mute); }

/* ---------- 2. danh sách bài ---------- */

.bl-index { padding-bottom: 96px; }

.bl-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid var(--bl-line); margin-bottom: 40px;
}
.bl-select { position: relative; display: inline-flex; }
.bl-select select {
  appearance: none; -webkit-appearance: none; height: 42px; padding: 0 40px 0 18px;
  border-radius: 999px; border: 1px solid var(--bl-line); background: var(--bl-card);
  color: var(--bl-ink); font-family: inherit; font-size: 13.5px; cursor: pointer;
}
.bl-select select:focus-visible { outline: 2px solid var(--bl-orange); outline-offset: 2px; }
.bl-select .ic {
  position: absolute; right: 14px; top: 50%; width: 14px; height: 14px;
  transform: translateY(-50%) rotate(90deg); color: var(--bl-mute); pointer-events: none;
}
.bl-search { position: relative; margin-left: auto; width: min(320px, 100%); }
.bl-search input {
  width: 100%; height: 42px; padding: 0 44px 0 18px; border-radius: 999px;
  border: 1px solid var(--bl-line); background: var(--bl-card); color: var(--bl-ink);
  font-family: inherit; font-size: 13.5px;
}
.bl-search input::placeholder { color: var(--bl-mute-2); }
.bl-search input:focus-visible { outline: 2px solid var(--bl-orange); outline-offset: 2px; }
.bl-search .ic {
  position: absolute; right: 16px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%); color: var(--bl-mute); pointer-events: none;
}

/* bài nổi bật */

.bl-feat-card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden;
  border: 1px solid var(--bl-line); border-radius: 24px; background: var(--bl-card);
  transition: border-color .15s, transform .15s;
}
.bl-feat-card:hover { border-color: var(--bl-line-2); transform: translateY(-2px); }
.bl-feat-copy {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  min-width: 0; padding: 36px;
}
.bl-feat-copy h2 { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.14; letter-spacing: -.03em; color: var(--bl-ink); }
.bl-feat-copy p { font-size: 14.5px; line-height: 1.6; color: var(--bl-mute); }
.bl-feat-foot {
  margin-top: auto; width: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding-top: 12px;
}
.bl-feat-meta { font-size: 12px; color: var(--bl-mute-2); }
.bl-feat-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px;
  border-radius: 999px; background: var(--bl-lime); color: #141311; font-size: 13.5px; font-weight: 650;
  white-space: nowrap;
}
.bl-feat-btn .ic { width: 15px; height: 15px; }

.bl-also-label {
  margin: 28px 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--bl-mute-2);
}
.bl-also { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bl-also-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--bl-line); border-radius: 16px;
  transition: border-color .15s, background .15s;
}
.bl-also-item:hover { border-color: var(--bl-line-2); background: var(--bl-card); }
.bl-also-item > span { min-width: 0; display: grid; gap: 2px; }
.bl-also-item b {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bl-mute-2);
}
.bl-also-item em { font-style: normal; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--bl-ink); }
.bl-also-item > .ic { width: 18px; height: 18px; color: var(--bl-mute-2); flex: 0 0 auto; transition: transform .15s; }
.bl-also-item:hover > .ic { transform: translateX(3px); }

/* lưới bài */

.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bl-grid [hidden] { display: none; }
.bl-card {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--bl-line);
  border-radius: 20px; background: var(--bl-card); transition: transform .15s, border-color .15s;
}
.bl-card:hover { transform: translateY(-3px); border-color: var(--bl-line-2); }
.bl-card-cover {
  position: relative; display: grid; place-items: center; height: 189px; overflow: hidden;
  background: radial-gradient(62% 80% at 50% 0%, var(--bl-tint), transparent 70%), var(--bl-card-2);
}
.bl-t0 { --bl-tint: rgba(255, 122, 26, .22); }
.bl-t1 { --bl-tint: rgba(200, 247, 81, .16); }
.bl-t2 { --bl-tint: rgba(45, 212, 191, .20); }
.bl-card-cover img { height: 150px; width: auto; object-fit: contain; }
.bl-card-topic {
  position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--bl-line); background: rgba(20, 19, 17, .72); color: #c9c9d1;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
html[data-theme="light"] .bl-card-topic { background: rgba(255, 255, 255, .92); color: #3c3c44; }
.bl-card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 228px; padding: 22px 24px 24px; }
.bl-card h3 { font-size: 19px; line-height: 1.25; letter-spacing: -.02em; color: var(--bl-ink); }
.bl-card p {
  font-size: 13.5px; line-height: 1.6; color: var(--bl-mute);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-card-meta {
  margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--bl-mute-2);
}
.bl-read { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--bl-orange); font-weight: 600; }
.bl-read .ic { width: 13px; height: 13px; transition: transform .15s; }
.bl-card:hover .bl-read .ic { transform: translateX(3px); }

/* phân trang */

.bl-pager { margin-top: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bl-page-btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--bl-line); color: var(--bl-ink); font-size: 13px; font-weight: 600;
}
a.bl-page-btn:hover { border-color: var(--bl-orange); color: var(--bl-orange); }
.bl-page-btn.is-off { color: var(--bl-mute-2); opacity: .65; }
.bl-page-count { font-size: 13px; color: var(--bl-mute); }
.bl-page-count b { color: var(--bl-ink); }
.bl-empty { margin-top: 24px; font-size: 14px; color: var(--bl-mute); }
.bl-empty a { color: var(--bl-orange); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- ảnh bìa dựng bằng HTML/CSS ---------- */

.bl-cover {
  position: relative; margin: 0; display: grid; grid-template-columns: 1.25fr .75fr;
  overflow: hidden; border: 1px solid var(--bl-line); border-radius: 24px; aspect-ratio: 1200 / 628;
  background:
    radial-gradient(70% 90% at 12% 0%, rgba(255, 122, 26, .18), transparent 62%),
    radial-gradient(60% 80% at 98% 100%, rgba(45, 212, 191, .14), transparent 66%),
    var(--bl-card-2);
}
.bl-cover-feat { width: 100%; min-height: 384px; border: 0; border-radius: 0; aspect-ratio: auto; }
html[data-theme="light"] .bl-cover {
  background:
    radial-gradient(70% 90% at 12% 0%, rgba(255, 122, 26, .22), transparent 62%),
    radial-gradient(60% 80% at 98% 100%, rgba(45, 212, 191, .18), transparent 66%),
    var(--bl-card-2);
}
.bl-cover > * { min-width: 0; }
.bl-cover-copy {
  position: relative; z-index: 2; display: flex; flex-direction: column;
  justify-content: space-between; gap: 16px; height: 100%; padding: 32px 22px 30px 34px;
}
.bl-cover-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--bl-ink); }
.bl-cover-brand .ic { width: 16px; height: 16px; color: var(--bl-orange); }
.bl-cover-title {
  font-size: clamp(20px, 2.1vw, 34px); line-height: 1.1; letter-spacing: -.03em;
  font-weight: 700; color: var(--bl-ink); overflow-wrap: break-word;
}
.bl-cover-chip {
  align-self: flex-start; display: inline-flex; padding: 6px 12px; border-radius: 8px;
  background: #141311; color: #fff; font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.bl-cover-art {
  grid-column: 2; align-self: end; justify-self: center; width: 100%; height: 96%; min-width: 0;
  object-fit: contain; object-position: bottom center;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .45));
}
.bl-cover-topic {
  position: absolute; top: 18px; right: 20px; z-index: 2; font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--bl-mute);
}

/* ---------- 3. trang bài ---------- */

.bl-post-head { padding: 64px 0 48px; }
.bl-narrow { width: min(768px, calc(100% - 48px)); margin: 0 auto; }
.bl-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--bl-mute); }
.bl-back .ic { width: 15px; height: 15px; transform: rotate(180deg); }
.bl-back:hover { color: var(--bl-ink); }
.bl-post-head h1 {
  margin-top: 24px; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05;
  letter-spacing: -.035em; color: var(--bl-ink);
}
.bl-metarow {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  font-size: 13px; color: var(--bl-mute);
}
.bl-author { display: inline-flex; align-items: center; gap: 10px; }
.bl-author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--bl-line); background: var(--bl-card); }
.bl-author b { font-weight: 600; color: var(--bl-ink); }
.bl-meta { display: inline-flex; align-items: center; gap: 7px; }
.bl-meta .ic { width: 16px; height: 16px; color: var(--bl-mute-2); }

.bl-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px;
  width: min(1152px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 80px;
}
.bl-main { min-width: 0; }
.bl-main > .bl-cover { max-width: 768px; margin-bottom: 48px; }
.bl-side { position: relative; }
.bl-toc { position: sticky; top: 28px; }
.bl-toc > p {
  margin: 0 0 16px; font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--bl-mute-2);
}
.bl-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--bl-line); display: grid; gap: 2px; }
.bl-toc a {
  display: block; margin-left: -1px; padding: 6px 0 6px 16px; border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.45; color: var(--bl-mute); transition: color .15s, border-color .15s;
}
.bl-toc a:hover { color: var(--bl-ink); }
.bl-toc a.on { color: var(--bl-ink); border-color: var(--bl-orange); font-weight: 600; }

.bl-prose { max-width: 768px; font-size: 17px; line-height: 1.88; color: var(--bl-ink-2); }
.bl-prose > :first-child { margin-top: 0; }
.bl-prose p { margin: 0 0 24px; }
.bl-prose h2 {
  margin: 56px 0 20px; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.2;
  letter-spacing: -.03em; color: var(--bl-ink); scroll-margin-top: 96px;
}
.bl-prose h3 { margin: 32px 0 12px; font-size: 20px; color: var(--bl-ink); }
.bl-prose ul, .bl-prose ol { margin: 0 0 24px; padding-left: 24px; }
.bl-prose li { margin: 10px 0; }
.bl-prose li::marker { color: var(--bl-orange); }
.bl-prose strong { color: var(--bl-ink); font-weight: 650; }
.bl-prose a { color: var(--bl-orange); text-decoration: underline; text-underline-offset: 3px; }
.bl-prose blockquote {
  margin: 28px 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--bl-orange);
  font-size: 17px; line-height: 1.7; font-style: italic; color: var(--bl-ink);
}
.bl-prose img {
  width: auto; max-width: 100%; height: auto; margin: 28px 0;
  border-radius: 16px; border: 1px solid var(--bl-line);
}
.bl-prose .faq { display: grid; gap: 10px; margin: 8px 0 0; }
.bl-prose .faq details {
  padding: 16px 18px; border: 1px solid var(--bl-line); border-radius: 14px; background: var(--bl-card);
}
.bl-prose .faq summary {
  display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; color: var(--bl-ink);
}
.bl-prose .faq summary::-webkit-details-marker { display: none; }
.bl-prose .faq summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--bl-mute); }
.bl-prose .faq details[open] summary::after { content: "−"; }
.bl-prose .faq p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--bl-mute); }

.bl-tags {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none;
  margin: 48px 0 0; padding: 32px 0 0; border-top: 1px solid var(--bl-line);
}

/* hộp CTA trong bài */

.bl-ctabox {
  margin-top: 64px; padding: 36px 40px; border: 1px solid var(--bl-line); border-radius: 24px;
  background:
    radial-gradient(70% 90% at 8% 0%, rgba(255, 122, 26, .14), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(45, 212, 191, .12), transparent 62%),
    var(--bl-card);
}
.bl-ctabox-in { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: center; }
.bl-ctabox h2 { margin: 16px 0 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -.03em; color: var(--bl-ink); }
.bl-ctabox p { margin: 12px 0 0; max-width: 420px; font-size: 14.5px; line-height: 1.6; color: var(--bl-mute); }
.bl-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
html[data-theme="light"] .bl-cta-btns .btn-ghost { border-color: #cfcfd6; color: #1b1b20; background: #fff; }
.bl-mini { border: 1px solid var(--bl-line); border-radius: 16px; padding: 14px; background: rgba(20, 19, 17, .55); }
html[data-theme="light"] .bl-mini { background: #f7f7f8; }
.bl-mini-row {
  display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 2px 10px;
  padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--bl-line); border-radius: 10px;
}
.bl-mini-row .ic { grid-row: span 2; width: 16px; height: 16px; color: var(--bl-orange); }
.bl-mini-row span { font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--bl-ink); }
.bl-mini-row small { font-size: 10.5px; line-height: 1.3; color: var(--bl-mute-2); }
.bl-mini-foot { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 11px; color: var(--bl-mute); }
.bl-mini-foot .ic { width: 14px; height: 14px; color: var(--bl-teal); }

/* prev / next */

.bl-pn {
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--bl-line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.bl-pn-card {
  display: grid; align-content: center; gap: 6px; min-height: 106px; padding: 20px 22px;
  border: 1px solid var(--bl-line); border-radius: 16px; transition: border-color .15s, background .15s;
}
.bl-pn-card:hover { border-color: var(--bl-line-2); background: var(--bl-card); }
.bl-pn-card small { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bl-mute-2); }
.bl-pn-card span { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--bl-ink); }
.bl-pn-next { grid-column: 2; text-align: right; }

/* keep reading */

.bl-keep { padding: 0 0 96px; }
.bl-keep-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.bl-keep-head h2 { font-size: 26px; letter-spacing: -.03em; color: var(--bl-ink); }
.bl-keep-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--bl-orange); }
.bl-keep-all .ic { width: 14px; height: 14px; }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .bl-hero-art { left: -26px; top: -10px; width: 150px; opacity: .85; }
}
@media (max-width: 1024px) {
  .bl-body { grid-template-columns: 1fr; }
  .bl-side { display: none; }
}
@media (max-width: 900px) {
  .bl-hero { padding: 56px 0 44px; }
  .bl-hero-art { display: none; }
  .bl-hero h1 { font-size: clamp(30px, 6.4vw, 42px); }
  .bl-hero p { font-size: 16px; }
  .bl-grid { grid-template-columns: repeat(2, 1fr); }
  .bl-feat-card { grid-template-columns: 1fr; }
  .bl-cover-feat { aspect-ratio: 1200 / 628; height: auto; }
  .bl-main > .bl-cover { margin-bottom: 32px; }
}
@media (max-width: 720px) {
  .bl-grid, .bl-also { grid-template-columns: 1fr; }
  .bl-toolbar { gap: 10px; }
  .bl-search { margin-left: 0; width: 100%; }
  .bl-feat-copy { padding: 24px; }
  .bl-feat-foot { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bl-post-head { padding: 40px 0 32px; }
  .bl-metarow { gap: 10px 16px; font-size: 12.5px; }
  .bl-body { padding-bottom: 56px; }
  .bl-prose { font-size: 16px; line-height: 1.8; }
  .bl-prose h2 { margin-top: 40px; font-size: 24px; }
  .bl-prose blockquote { font-size: 16px; }
  .bl-cover { grid-template-columns: 1.35fr .65fr; }
  .bl-cover-copy { padding: 20px 8px 20px 20px; }
  .bl-cover-title { font-size: 18px; }
  .bl-cover-chip { font-size: 9.5px; padding: 4px 9px; }
  .bl-cover-art { height: 92%; }
  .bl-card-cover { height: 170px; }
  .bl-card-cover img { height: 130px; }
  .bl-ctabox { padding: 24px; margin-top: 40px; }
  .bl-ctabox-in { grid-template-columns: 1fr; }
  .bl-pn { grid-template-columns: 1fr; }
  .bl-pn-next { grid-column: 1; text-align: left; }
  .bl-page-count { font-size: 12px; }
  .bl-keep { padding-bottom: 64px; }
  .bl-keep-head h2 { font-size: 22px; }
}
