/* Thushara Builds — the article sheet, post header, meta row and prose. */

/* --- The white sheet on the off-white page ------------------------------ */

.tb-sheet {
  inline-size: 100%;
  max-inline-size: var(--wp--custom--sheet-width);
  margin-inline: auto;
  padding: var(--wp--preset--spacing--100);
  background-color: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--wp--custom--radius--lg);
  box-shadow: var(--wp--custom--shadow--sm);
}

/* --- Post header -------------------------------------------------------- */

.tb-post-header {
  padding-block-end: var(--wp--preset--spacing--50);
  margin-block-end: var(--wp--preset--spacing--70);
  border-block-end: 1px solid var(--wp--preset--color--line);
}

.tb-post-title {
  margin: 0;
  text-wrap: balance;
}

.tb-post-meta {
  margin-block-start: var(--wp--preset--spacing--50);
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--md);
  line-height: 1.5;
  color: var(--wp--preset--color--subtle);
}

.tb-post-meta__author {
  font-weight: 600;
  color: var(--wp--preset--color--muted);
}

.tb-post-meta__author p {
  margin: 0;
}

.tb-post-meta__avatar {
  margin: 0;
}

.tb-post-meta__avatar img {
  inline-size: 1.5rem;
  block-size: 1.5rem;
  border-radius: var(--wp--custom--radius--pill);
  object-fit: cover;
}

/* Decorative, always paired with visible text, so brand orange is safe here. */
.tb-post-meta__item {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--10);
  margin: 0;
}

.tb-post-meta__item::before {
  content: "";
  display: inline-block;
  flex: none;
  inline-size: 1.1em;
  block-size: 1.1em;
  background-color: var(--wp--preset--color--accent);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tb-post-meta__date::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 9.5h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 9.5h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

/* --- Prose -------------------------------------------------------------- */

.tb-prose > * {
  margin-block-start: var(--wp--preset--spacing--50);
}

.tb-prose > *:first-child {
  margin-block-start: 0;
}

.tb-prose > h2 {
  margin-block-start: var(--wp--preset--spacing--70);
}

.tb-prose p {
  text-wrap: pretty;
}

.tb-prose strong {
  font-weight: 700;
  color: var(--wp--preset--color--contrast);
}

.tb-prose :not(pre) > code {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.85em;
  padding: 0.12em 0.36em;
  border-radius: var(--wp--custom--radius--xs);
  background-color: var(--wp--preset--color--accent-soft);
  color: var(--wp--custom--brand-deep);
}

.tb-prose a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--wp--custom--duration--fast)
    var(--wp--custom--easing--standard);
}

.tb-prose ul,
.tb-prose ol {
  padding-inline-start: var(--wp--preset--spacing--50);
}

.tb-prose li::marker {
  color: var(--wp--preset--color--accent);
}

/* --- Below 480px the sheet goes full bleed ------------------------------- */

@media (max-width: 30rem) {
  body,
  .wp-site-blocks {
    padding-inline: 0;
  }

  .tb-sheet {
    border-inline: 0;
    border-radius: 0;
  }

  .tb-post-meta {
    column-gap: var(--wp--preset--spacing--40);
  }
}

@media print {
  body {
    background-color: var(--wp--preset--color--surface);
  }

  .tb-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
