/* ==========================================================================
   Itavel — Editorial Typography
   --------------------------------------------------------------------------
   Readable Japanese media typography for post/page content. Scoped to the
   Blocksy content entry so it never fights the theme chrome. Mobile-first:
   base rules target small screens, media queries scale up.
   ========================================================================== */

/* Page canvas -------------------------------------------------------------- */
body {
  background-color: var(--itavel-bg);
  color: var(--itavel-text);
  font-family: var(--itavel-font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The article body. Blocksy wraps post content in .entry-content. ---------- */
.entry-content {
  font-size: 1.0625rem;            /* 17px — slightly larger for JP reading  */
  line-height: var(--itavel-lh-body);
  color: var(--itavel-text);
  letter-spacing: .01em;
  word-break: break-word;          /* avoid awkward JP/EN overflow           */
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .entry-content {
    font-size: 1.125rem;           /* 18px on tablet+                        */
    line-height: 2;
  }
}

/* Comfortable reading measure for long-form text blocks -------------------- */
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > blockquote {
  max-width: var(--itavel-measure);
}

/* Paragraph rhythm --------------------------------------------------------- */
.entry-content p {
  margin: 0 0 var(--itavel-space-5);
}

/* Headings — refined, warm, NOT textbook-stiff ----------------------------- */
.entry-content h2 {
  font-size: 1.5rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--itavel-heading);
  margin: var(--itavel-space-8) 0 var(--itavel-space-4);
  padding-bottom: var(--itavel-space-3);
  border-bottom: 2px solid var(--itavel-border);
}
.entry-content h2::before {
  /* soft terracotta marker instead of a heavy textbook underline */
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--itavel-terracotta);
  vertical-align: middle;
}
.entry-content h3 {
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 700;
  color: var(--itavel-green-dark);
  margin: var(--itavel-space-7) 0 var(--itavel-space-4);
  padding-left: var(--itavel-space-3);
  border-left: 4px solid var(--itavel-green);
}
.entry-content h4 {
  font-size: 1.075rem;
  font-weight: 700;
  color: var(--itavel-heading);
  margin: var(--itavel-space-6) 0 var(--itavel-space-3);
}

@media (min-width: 768px) {
  .entry-content h2 { font-size: 1.75rem; }
  .entry-content h3 { font-size: 1.375rem; }
}

/* Links -------------------------------------------------------------------- */
.entry-content a {
  color: var(--itavel-terracotta-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--itavel-border);
  transition: color .15s ease, text-decoration-color .15s ease;
}
.entry-content a:hover {
  color: var(--itavel-terracotta);
  text-decoration-color: currentColor;
}

/* Lists -------------------------------------------------------------------- */
.entry-content ul,
.entry-content ol {
  margin: 0 0 var(--itavel-space-5);
  padding-left: 1.4em;
}
.entry-content li { margin-bottom: var(--itavel-space-2); }
.entry-content ul li::marker { color: var(--itavel-terracotta); }
.entry-content ol li::marker { color: var(--itavel-green); font-weight: 700; }

/* Blockquote — warm pull quote -------------------------------------------- */
.entry-content blockquote {
  margin: var(--itavel-space-6) 0;
  padding: var(--itavel-space-4) var(--itavel-space-5);
  background: var(--itavel-surface-soft);
  border-left: 4px solid var(--itavel-terracotta);
  border-radius: 0 var(--itavel-radius-sm) var(--itavel-radius-sm) 0;
  color: var(--itavel-text-soft);
  font-style: normal;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* Images — large photos, soft corners -------------------------------------- */
.entry-content img {
  border-radius: var(--itavel-radius);
  height: auto;
}
.entry-content figure { margin: var(--itavel-space-6) 0; }
.entry-content figcaption {
  margin-top: var(--itavel-space-2);
  font-size: var(--itavel-fs-meta);
  color: var(--itavel-text-soft);
  text-align: center;
}

/* Inline code / kbd (for the occasional Italian pronunciation note) -------- */
.entry-content code {
  background: var(--itavel-surface);
  padding: .12em .45em;
  border-radius: 6px;
  font-size: .9em;
}

/* Tables — clean, readable ------------------------------------------------- */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--itavel-space-6) 0;
  font-size: .975rem;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--itavel-border);
  padding: var(--itavel-space-3) var(--itavel-space-4);
  text-align: left;
}
.entry-content thead th {
  background: var(--itavel-green-tint);
  color: var(--itavel-green-dark);
  font-weight: 700;
}
.entry-content tbody tr:nth-child(even) td { background: var(--itavel-surface-soft); }

/* Post title + meta on single/archive ------------------------------------- */
.entry-title { color: var(--itavel-heading); letter-spacing: .005em; }
.entry-meta,
.post-meta { color: var(--itavel-text-soft); font-size: var(--itavel-fs-meta); }
