/* ============================================================================
   Tech-o-Yaki — Highlighted boxes of a single post
   Key takeaways, FAQ and sources (markup of the DR AI Writer plugin), related
   posts ([toy_related_posts]) and the author box of the single post template.
   Same recipe as the summary box: cream card, ink border, hard coloured shadow.
   Everything is prefixed with .single-post to win over the article prose styles.
   ============================================================================ */

.single-post .draiw-takeaways-section,
.single-post .draiw-faq-section,
.single-post .draiw-sources-section,
.single-post .toy-related,
.single-post aside:has(> p > .toy-avatar) {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background-color: var(--base);
  border: 2px solid var(--contrast);
  box-shadow: 4px 4px 0 var(--toy-box-accent);
}

/* One accent per box: label and shadow match. */
.single-post .draiw-takeaways-section { --toy-box-accent: var(--toy-color-tech); }
.single-post .draiw-faq-section,
.single-post .toy-related { --toy-box-accent: var(--toy-color-android); }
.single-post .draiw-sources-section { --toy-box-accent: var(--toy-color-gaming); }
.single-post aside:has(> p > .toy-avatar) { --toy-box-accent: var(--toy-color-films); }

/* ---------- Label ---------- */
/* The plugin writes the label as a paragraph; articles stored before it did use an h2. */
.single-post .draiw-takeaways-section > :is(p, h2),
.single-post .draiw-faq-section > :is(p, h2),
.single-post .draiw-sources-section > :is(p, h2),
.single-post .toy-related__label,
.single-post aside:has(> p > .toy-avatar) > div > span {
  margin: 0 0 0.9rem;
  font-family: var(--toy-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--toy-box-accent);
}
.single-post .draiw-takeaways-section > .mini {
  margin: 0.9rem 0 0;
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: lowercase;
}
.single-post aside:has(> p > .toy-avatar) > div > span { margin: 0; }

/* ---------- Key takeaways and sources: lists ---------- */
.single-post .draiw-takeaways-section ul,
.single-post .draiw-sources-section ul {
  margin: 0;
  padding-left: 1.1rem;
}
.single-post .draiw-takeaways-section li,
.single-post .draiw-sources-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.single-post .draiw-takeaways-section li:last-child,
.single-post .draiw-sources-section li:last-child { margin-bottom: 0; }

.single-post .draiw-sources-section li a {
  color: var(--toy-box-accent);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  overflow-wrap: anywhere;
}
.single-post .draiw-sources-section li a:hover { color: var(--contrast); }

/* ---------- Related posts ---------- */
/* The shortcode sits outside the 760px text column of the template: same width and gutters. */
.single-post .toy-related {
  width: calc(100% - 2 * var(--toy-container-pad));
  max-width: calc(760px - 2 * var(--toy-container-pad));
  margin-inline: auto;
}
.single-post .toy-related__list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.single-post .toy-related__link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--toy-font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--contrast);
  text-decoration: none;
}
.single-post .toy-related__link:hover span,
.single-post .toy-related__link:focus-visible span {
  text-decoration: underline;
  text-decoration-color: var(--toy-box-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.single-post .toy-related__link img {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid var(--contrast);
}

/* ---------- Author box ---------- */
.single-post aside:has(> p > .toy-avatar) .toy-avatar { display: block; border-radius: 50%; }
