/* =====================================================================
   Free book pages — on top of books/word/style.css (same layout).
   Adds: the free download block, the share button, and the banner for
   the other books (under the book on computers, last page of the book /
   after the last page on phones).
===================================================================== */
:root{
  --free: #179246;
  --free-soft: #E3F6EA;
}

/* two columns, filled top to bottom: --rows = half the chapters */
.bk-free .bk-chapters ol{ grid-template-rows: repeat(var(--rows, 4), auto); }

/* ---------- free download ---------- */
.get-free{
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--free-soft);
  border: 1.5px solid rgba(23,146,70,.35);
}
.get-free b{ font-size: 1.9rem; font-weight: 900; line-height: 1.2; color: #127A3A; }
.get-free small{ font-size: .78rem; font-weight: 700; color: var(--ink-soft); }

.order-dl{
  min-height: 74px;
  background: linear-gradient(135deg, #2A7899 0%, var(--brand) 55%, var(--brand-strong) 100%);
}
.order-dl .order-ico{ background: var(--gold); color: var(--brand-strong); }
.order-dl .order-ico svg{ stroke-width: 2.6; }

.order-share{
  min-height: 54px; width: 100%;
  border: 1.5px solid var(--brand);
  background: var(--surface); color: var(--brand);
  font-family: inherit; text-align: start; cursor: pointer;
  box-shadow: none;
}
.order-share .order-ico{ width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); }
.order-share .order-ico svg{ width: 21px; height: 21px; }
.order-share .order-txt strong{ font-size: 1rem; }
.order-share:hover{ background: var(--brand-soft); filter: none; }
.order-share.done{ border-color: var(--free); background: var(--free-soft); color: #127A3A; }
.order-share:focus-visible{ outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- computers: banner under the book ---------- */
.mb-strip{
  flex-shrink: 0;
  display: flex; align-items: center; gap: 14px;
  margin: 0 18px 14px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--gold);
  box-shadow: var(--shadow-md);
  color: var(--ink); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.mb-strip:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.mb-strip:focus-visible{ outline: 3px solid var(--gold); outline-offset: 3px; }
.mb-strip img{
  width: 46px; height: auto; flex-shrink: 0;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 3px 10px rgba(19,40,58,.22);
}
.mb-strip-txt{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mb-strip-txt small{ font-size: .72rem; font-weight: 800; color: #9B6A12; }
.mb-strip-txt strong{ font-size: .98rem; font-weight: 900; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-strip-meta{ font-size: .78rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-strip-btn{
  flex-shrink: 0;
  padding: 10px 18px; border-radius: 999px;
  background: var(--gold); color: var(--ink);
  font-size: .92rem; font-weight: 900; white-space: nowrap;
}
@media (min-width: 861px) and (max-width: 1100px){
  .mb-strip-meta{ display: none; }
}
@media (min-width: 861px) and (max-height: 700px){
  .mb-strip{ padding-block: 6px; margin-bottom: 10px; }
  .mb-strip img{ width: 34px; }
  .mb-strip-meta{ display: none; }
}

/* ---------- last page: the other books ---------- */
.mb-end{ gap: 9px; padding: 18px 16px; }
.mb-end-kicker{
  font-size: .8rem; font-weight: 800;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(255,255,255,.14); color: var(--gold);
}
.pv-end.mb-end strong{ font-size: 1.12rem; line-height: 1.45; }
.mb-feat{
  width: 100%; max-width: 300px;
  display: flex; align-items: center; gap: 11px;
  padding: 10px;
  border-radius: 14px;
  background: #fff; color: var(--ink);
  text-decoration: none; text-align: start;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.mb-feat img,
.fb-page .mb-feat img{                 /* not the full-page rule of the book's page images */
  position: static;
  width: 30%; max-width: 74px; height: auto; flex-shrink: 0;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 3px 10px rgba(19,40,58,.25);
}
.mb-feat-txt{ min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mb-feat-txt b{ font-size: .86rem; font-weight: 900; line-height: 1.4; }
.mb-feat-txt > span{ font-size: .72rem; font-weight: 600; color: var(--ink-soft); }
.mb-feats{ width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 8px; }
.mb-feats .mb-feat{ padding: 8px; }
.mb-feats .mb-feat img{ max-width: 52px; width: 22%; }
.pv-end-link{
  padding: 10px 24px; border-radius: 999px;
  background: var(--gold); color: var(--ink);
  font-size: .95rem; font-weight: 900; text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}
.pv-end-link:hover{ transform: translateY(-1px); filter: brightness(1.06); }
.pv-end-link:focus-visible, .mb-feat:focus-visible, .mb-all:focus-visible{ outline: 3px solid var(--gold); outline-offset: 3px; }
.mb-soon{
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px;
  font-size: .76rem; font-weight: 700; opacity: .9;
}
.mb-soon i{
  font: 700 .72rem/1 var(--font-en); font-style: normal;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(255,255,255,.14);
}
.mb-all{ font-size: .82rem; font-weight: 800; color: #fff; opacity: .9; }
.mb-all:hover{ opacity: 1; }

/* ---------- phones ---------- */
@media (max-width: 860px){
  .mb-strip{ display: none; }          /* the same books follow the last page */
  .bk-get{ order: 1; scroll-margin-top: calc(var(--top-h) + 12px); }   /* download right under the title */
  .bk-head{ order: 0; }
  .pv-list-end .mb-end{ padding: 24px 16px; }
  .mb-feat{ max-width: 380px; }
  .m-cta b{ color: #7BE3A1; }
}
