/**
 * Intellepedia Books — homepage rail module and post-page "Further reading" card.
 * Uses the theme's design tokens (with fallbacks). Quiet by design: no colour blocks, no motion.
 */

/* New-tab arrow (decorative; the link text tells screen readers) */
.ipb-ext { display: inline-block; width: .72em; height: .72em; margin-left: .3em; vertical-align: .02em; opacity: .7; }

/* Covers */
.ipb-cover { display: block; height: auto; border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 3px 10px rgba(0, 0, 0, .07); }

/* ---- Homepage rail ---- */
.ipb-list { list-style: none; margin: 0; padding: 0; }
.ipb-item {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--ip-line-soft, #f0f0f0);
}
.ipb-item:first-child { padding-top: 4px; }
.ipb-item:last-child { border-bottom: 0; }
.ipb-item .ipb-cover { width: 56px; }
.ipb-item__text p { margin: 0; font-family: var(--ip-sans, sans-serif); line-height: 1.4; }
.ipb-item__title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.ip-redesign .ipb-item__link { color: var(--ip-ink, #1a1a1a); text-decoration: none; }
.ip-redesign .ipb-item__link:hover,
.ip-redesign .ipb-item__link:focus-visible { color: var(--ip-accent, #b8430d); }
/* The cover is part of the title link's click area (one link, one tab stop). */
.ipb-item__link::after { content: ""; position: absolute; left: 0; top: 4px; width: 56px; height: 83px; }
.ipb-item:not(:first-child) .ipb-item__link::after { top: 14px; }
.ipb-item__meta, .ipb-item__status { font-size: 12.5px; color: var(--ip-ink-faint, #767676); margin-top: 3px !important; }
.ipb-item__more { font-size: 12.5px; font-weight: 600; margin-top: 6px !important; }
.ip-redesign .ipb-item__more a { color: var(--ip-accent, #b8430d); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Post page card (after the author card) ---- */
.ipb-card {
  margin: 32px 0 0; padding: 22px 24px; background: var(--ip-surface, #fff);
  border: 1px solid var(--ip-line, #e4e4e4); border-radius: 10px;
}
.ip-article .ipb-card__heading {
  font-family: var(--ip-sans, sans-serif); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ip-ink-faint, #767676); margin: 0 0 14px; padding: 0; border: 0;
}
.ipb-card__grid { position: relative; display: grid; grid-template-columns: 88px 1fr; gap: 20px; align-items: start; }
.ipb-card .ipb-cover { width: 88px; }
.ipb-card__text p { margin: 0; }
.ipb-card__title { font-family: var(--ip-sans, sans-serif); font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 4px !important; }
.ip-redesign .ipb-card__link { color: var(--ip-ink, #1a1a1a); text-decoration: none; }
.ip-redesign .ipb-card__link:hover,
.ip-redesign .ipb-card__link:focus-visible { color: var(--ip-accent, #b8430d); }
.ipb-card__link::after { content: ""; position: absolute; left: 0; top: 0; width: 88px; height: 131px; }
.ipb-card__meta { font-family: var(--ip-sans, sans-serif); font-size: 13px; color: var(--ip-ink-faint, #767676); }
.ipb-card__status { font-family: var(--ip-sans, sans-serif); font-size: 13px; color: var(--ip-ink-soft, #4a4a4a); margin-top: 2px !important; }
.ipb-card__blurb { font-family: var(--ip-serif, serif); font-size: 15.5px; line-height: 1.6; color: var(--ip-ink-soft, #4a4a4a); margin-top: 10px !important; }
.ipb-card__links {
  list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-family: var(--ip-sans, sans-serif); font-size: 13.5px; font-weight: 600; line-height: 1.5;
}
.ipb-card__links li { margin: 0; }
.ip-redesign .ipb-card__links a { color: var(--ip-accent, #b8430d); text-decoration: underline; text-underline-offset: 2px; }
.ipb-card__note { display: inline-block; font-weight: 400; color: var(--ip-ink-faint, #767676); } /* inline-block: the link underline does not carry into the note */

/* Editors-only preview marker (book page still a draft) */
.ipb-preview {
  display: inline-block; margin-top: 8px !important; padding: 2px 8px; border-radius: 4px;
  font-family: var(--ip-sans, sans-serif); font-size: 11.5px; color: #6b4a00; background: #fff6dc;
}

@media (max-width: 480px) {
  .ipb-card { padding: 18px; }
  .ipb-card__grid { grid-template-columns: 64px 1fr; gap: 14px; }
  .ipb-card .ipb-cover { width: 64px; }
  .ipb-card__link::after { width: 64px; height: 95px; }
}
