/* Blog index (.bl-) and article template (.bp-) */

/* ---------- Blog index: hero + featured ---------- */
.bl-hero { display: flex; flex-direction: column; gap: 32px; padding-top: 64px; padding-bottom: 48px; }
.bl-intro { max-width: 720px; }
.bl-title { font-size: clamp(36px, 4vw, 52px); }
.bl-lead { max-width: none; font-size: clamp(17px, 1.4vw, 19px); }

.bl-feat {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: #fff;
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.bl-feat:hover { color: var(--ink); border-color: var(--line-2); box-shadow: 0 14px 36px rgba(18,18,18,0.08); }
.bl-feat:hover .bl-feat-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bl-feat-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--dark-2);
  display: flex; align-items: center; justify-content: center;
}
.bl-feat-body { display: flex; flex-direction: column; gap: 12px; padding: 8px 16px 8px 0; }
.bl-feat-title { font-family: var(--font-display); font-size: clamp(26px, 2.4vw, 32px); line-height: 1.12; font-weight: 800; }

.bl-play {
  width: 52px; height: 52px; border-radius: 999px; background: var(--orange-bright); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.bl-play svg { width: 20px; height: 20px; margin-left: 2px; }
.bl-play-lg { width: 68px; height: 68px; }
.bl-play-lg svg { width: 24px; height: 24px; }
.bl-duration {
  position: absolute; left: 14px; bottom: 12px; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--ink); padding: 3px 8px; border-radius: 6px;
}
.bl-ph-caption { position: absolute; left: 14px; top: 12px; font-size: 12px; color: var(--line); }

.bl-cat { font-size: 13px; font-weight: 700; color: var(--orange-text); }
.bl-meta { font-size: 14px; color: var(--text-3); }

/* ---------- Blog index: toolbar + grid ---------- */
.bl-list-section { padding: 56px 0 96px; }
.bl-list-wrap { gap: 32px; }
.bl-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.bl-search {
  display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 260px; padding: 0 14px;
  border: 1.5px solid var(--input-border); border-radius: 12px; background: #fff; color: var(--text-3); cursor: text;
}
.bl-search:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; }
.bl-search svg { width: 18px; height: 18px; flex-shrink: 0; }
.bl-search input { flex: 1; min-width: 0; min-height: 42px; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--ink); }

.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.bl-card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.bl-card[hidden] { display: none; }
.bl-thumb {
  position: relative; aspect-ratio: 16 / 10; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.bl-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bl-soon { color: var(--text-3); background: var(--cream-2); }
.bl-card-title { font-size: 20px; line-height: 1.3; font-weight: 700; }
.bl-dek { font-size: 15px; color: var(--text-2); }
.bl-card .bl-meta { font-size: 13px; }
.bl-empty { font-size: 16px; font-weight: 600; color: var(--text-2); text-align: center; }
.bl-empty:empty { display: none; }

/* ---------- Blog index: coming-soon sections ---------- */
.bl-soon-section { padding: 0 0 72px; }
.bl-soon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bl-soon-card {
  display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-radius: 18px;
  border: 1px dashed var(--line-2); background: var(--cream);
}
.bl-soon-card .icon-tile { width: 48px; height: 48px; }
.bl-soon-card .h-card { font-size: 20px; }
.bl-soon-card p { font-size: 15px; }

/* ---------- Blog index: newsletter ---------- */
.bl-news {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding-top: 72px; padding-bottom: 72px;
}
.bl-news-title { font-family: var(--font-display); font-size: clamp(30px, 3vw, 40px); line-height: 1.08; font-weight: 800; }
.bl-news-copy { color: var(--on-dark-2); }
.bl-news-submit { font-size: 15px; font-weight: 600; color: var(--orange-light); }
.bl-news-submit a { color: #fff; }
.bl-news-submit a:hover { color: var(--orange-light); }
.bl-news-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.bl-news-field { flex: 1; min-width: 240px; }
.bl-news-field > label { font-size: 14px; }
.bl-news-field .input { border: 0; }
.bl-news-status { flex-basis: 100%; }
.bl-news-status.ok { color: #6FD39B; }
.bl-news-status.err { color: var(--orange-light); }

/* ---------- Article ---------- */
.bp-main { font-size: 18px; line-height: 1.7; }
.bp-head {
  max-width: 820px; margin: 0 auto; padding: 48px 20px 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.bp-crumbs { font-size: 14px; color: var(--text-3); }
.bp-crumbs a { color: var(--text-3); display: inline-block; padding: 6px 0; }
.bp-crumbs a:hover { color: var(--ink); }
.bp-label {
  align-self: flex-start; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--orange-text);
  background: var(--orange-soft); padding: 4px 10px; border-radius: 6px;
}
.bp-h1 {
  font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 48px); line-height: 1.06;
  font-weight: 800; letter-spacing: -0.03em; text-wrap: balance;
}
.bp-dek { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--text-2); }
.bp-byline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; line-height: 1.5; color: var(--text-3); }
.bp-byline strong { color: var(--ink); }
.bp-avatar { width: 40px; height: 40px; border-radius: 999px; background: #E9DED0; flex-shrink: 0; }

.bp-video-wrap { max-width: 1040px; margin: 0 auto 48px; padding: 0 20px; }
.bp-video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 20px; background: var(--dark-2);
  display: flex; align-items: center; justify-content: center;
}
.bp-play {
  width: 80px; height: 80px; border: 0; border-radius: 999px; background: var(--orange-bright); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s;
}
.bp-play:hover { transform: scale(1.06); }
.bp-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.bp-play svg { width: 28px; height: 28px; margin-left: 3px; }
.bp-video-label {
  position: absolute; left: 16px; bottom: 14px; font-size: 13px; font-weight: 700; line-height: 1.4; color: #fff;
  background: var(--ink); padding: 3px 8px; border-radius: 6px;
}

.bp-layout {
  display: grid; grid-template-columns: 240px minmax(0, 720px) 260px; gap: 48px; justify-content: center;
  max-width: 1320px; margin: 0 auto; padding: 0 32px;
}
.bp-toc-inner {
  position: sticky; top: calc(var(--header-h) + 24px);
  display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4;
}
.bp-toc-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.bp-toc-inner a { color: var(--text-3); text-decoration: none; }
.bp-toc-inner a:hover { color: var(--ink); text-decoration: underline; }
.bp-toc-inner a[aria-current="true"] { color: var(--ink); font-weight: 600; }

.bp-body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.bp-body > h2 {
  margin-top: 16px; font-family: var(--font-display); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; font-weight: 800;
}
.bp-body > h3 { font-size: 22px; line-height: 1.3; font-weight: 700; }
.bp-takeaways { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; border-radius: 16px; background: var(--blue-soft); }
.bp-takeaways-title { font-weight: 700; color: var(--blue-dark); }
.bp-takeaways ul { margin: 0; padding-left: 20px; font-size: 17px; display: flex; flex-direction: column; gap: 4px; }

.bp-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.bp-table caption { text-align: left; font-size: 14px; color: var(--text-3); padding-bottom: 8px; }
.bp-table caption .sample-badge { margin-right: 4px; }
.bp-table tr { border-top: 1px solid var(--line); }
.bp-table th { text-align: left; font-weight: 500; padding: 10px 12px 10px 0; }
.bp-table td { text-align: right; white-space: nowrap; }
.bp-plus { font-weight: 700; }
.bp-minus { color: var(--red); font-weight: 600; }
.bp-table .bp-total { border-top: 2px solid var(--ink); }
.bp-total th { font-weight: 700; padding: 12px 12px 12px 0; }
.bp-total td { font-family: var(--font-display); font-size: 22px; font-weight: 800; }

.bp-cta {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px;
}
.bp-cta-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; line-height: 1.5; }
.bp-cta-text span { font-size: 16px; color: var(--text-2); }
.bp-cta-btn { min-height: 48px; padding: 0 20px; font-size: 16px; border-radius: 12px; }

.bp-foot {
  display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--text-3);
}
.bp-copy {
  padding: 0; border: 0; background: none; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: 15px;
}
.bp-copy:hover { color: var(--blue-dark); }

.bp-help { display: flex; flex-direction: column; gap: 16px; }
.bp-help-dark {
  display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 18px;
  background: var(--dark); color: #fff;
}
.bp-help-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.15; }
.bp-help-copy { font-size: 15px; line-height: 1.5; color: var(--on-dark-2); }
.bp-help-btn { min-height: 48px; padding: 0 16px; font-size: 16px; border-radius: 12px; }
.bp-help-card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 18px;
  font-size: 15px; line-height: 1.5;
}
.bp-help-card strong { font-size: 16px; }
.bp-help-card span { color: var(--text-2); }
.bp-help-card a { font-weight: 600; }

.bp-related-section { margin-top: 80px; padding: 72px 0; }
.bp-related-title { font-family: var(--font-display); font-size: 32px; line-height: 1.15; font-weight: 800; }
.bp-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bp-rel { display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
.bp-rel-img { aspect-ratio: 16 / 10; border-radius: 14px; }
.bp-rel-title { font-size: 19px; line-height: 1.3; font-weight: 700; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .bp-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 760px; padding: 0 20px; }
  .bp-toc { display: none; }
  .bp-help { flex-direction: row; flex-wrap: wrap; }
  .bp-help > * { flex: 1 1 260px; }
}

@media (max-width: 900px) {
  .bl-feat, .bl-news { grid-template-columns: 1fr; gap: 20px; }
  .bl-feat-body { padding: 4px 8px 8px; }
  .bl-grid { grid-template-columns: 1fr 1fr; }
  .bl-toolbar { flex-direction: column; align-items: stretch; min-width: 0; }
  .bl-toolbar > * { min-width: 0; max-width: 100%; }
  .bl-search { min-width: 0; }
  .bl-soon-grid { grid-template-columns: 1fr; }
  .bp-related { grid-template-columns: 1fr 1fr; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  .bl-hero { padding-top: 40px; padding-bottom: 36px; gap: 24px; }
  .bl-feat { padding: 12px; border-radius: 18px; }
  .bl-play-lg { width: 56px; height: 56px; }
  .bl-list-section { padding: 40px 0 64px; }
  .bl-list-wrap { gap: 24px; }
  .bl-toolbar .pill { min-height: 44px; }
  .bl-grid { grid-template-columns: 1fr; gap: 32px; }
  .bl-soon-section { padding-bottom: 56px; }
  .bl-soon-card { padding: 20px; }
  .bl-news { padding-top: 56px; padding-bottom: 56px; }
  .bl-news-form { flex-direction: column; align-items: stretch; }
  .bl-news-field { min-width: 0; }
  .bl-news-form .btn { width: 100%; }

  .bp-main { font-size: 17px; }
  .bp-head { padding: 28px 20px 24px; gap: 14px; }
  .bp-video-wrap { margin-bottom: 32px; }
  .bp-video { border-radius: 14px; }
  .bp-play { width: 64px; height: 64px; }
  .bp-video-label { left: 10px; bottom: 10px; font-size: 12px; }
  .bp-takeaways { padding: 18px 20px; }
  .bp-table { font-size: 16px; }
  .bp-cta { padding: 20px; }
  .bp-cta-btn { width: 100%; }
  .bp-foot a, .bp-copy { display: inline-block; padding: 10px 0; }
  .bp-help { flex-direction: column; }
  .bp-help > * { flex: none; }
  .bp-related-section { margin-top: 56px; padding: 56px 0; }
  .bp-related-title { font-size: 28px; }
  .bp-related {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .bp-rel { scroll-snap-align: start; }
}
