/* ============================================================
   DeAi協同組合 — WordPress content layer

   The static site never produced free-form prose: every block of text
   belonged to a component with its own class. The block editor does, so
   headings, lists, quotes and tables need styling that style.css has no
   reason to carry — and two of its resets actively get in the way here:

     ul, ol { list-style: none }     bullets disappear
     a      { text-decoration: none } links stop looking like links

   Everything below is scoped to .entry-content so those resets keep
   applying everywhere else, and every value is drawn from the design's own
   custom properties, so this layer follows Washi / Yoru / Sora and the
   seasonal paper tints without knowing anything about them.
   ============================================================ */

.entry-content {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 2.05;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.entry-content > * + * {
  margin-top: 1.5em;
}

/* ---------- Headings ---------- */

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--ink);
  line-height: 1.5;
}

.entry-content > h2 {
  margin-top: 2.4em;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--hair-strong);
}

.entry-content > h3 {
  margin-top: 2em;
  font-size: clamp(1.12rem, 1.9vw, 1.3rem);
}

.entry-content > h4 {
  margin-top: 1.8em;
  font-size: 1.05rem;
}

/* A vermilion tick in the margin, echoing the section indices */
.entry-content > h3::before {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 1px;
  margin-right: 0.6em;
  vertical-align: 0.3em;
  background: var(--shu);
}

/* ---------- Links ---------- */

.entry-content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--shu);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  transition: color var(--dur-hover) var(--ease-out-cubic);
}

.entry-content a:hover {
  color: var(--shu);
}

/* ---------- Lists ---------- */

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content li + li {
  margin-top: 0.5em;
}

.entry-content li::marker {
  color: var(--shu);
}

.entry-content li > ul,
.entry-content li > ol {
  margin-top: 0.5em;
}

/* ---------- Quotes ---------- */

.entry-content blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 0.2em 0 0.2em 1.4em;
  border-left: 2px solid var(--shu);
  font-family: var(--font-heading);
  font-size: 1.06rem;
  color: var(--ink);
}

.entry-content blockquote cite {
  display: block;
  margin-top: 0.8em;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-style: normal;
  color: var(--ink-3);
}

/* ---------- Figures and images ---------- */

.entry-content figure {
  margin-left: 0;
  margin-right: 0;
}

.entry-content img {
  height: auto;
}

.entry-content figcaption {
  margin-top: 0.7em;
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--ink-3);
}

/* ---------- Tables ---------- */

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.entry-content th,
.entry-content td {
  padding: 0.85em 1em;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: top;
}

.entry-content th {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink);
  border-bottom-color: var(--hair-strong);
}

/* Tables are the one block that can outgrow the column — let it scroll
   inside itself rather than pushing the whole page sideways. */
.entry-content .wp-block-table {
  overflow-x: auto;
}

/* ---------- Rules and code ---------- */

.entry-content hr {
  margin-top: 2.6em;
  margin-bottom: 2.6em;
  border: 0;
  border-top: 1px solid var(--hair-strong);
}

.entry-content code,
.entry-content pre {
  font-size: 0.88em;
  background: var(--paper-2);
}

.entry-content code {
  padding: 0.15em 0.4em;
}

.entry-content pre {
  padding: 1.2em 1.4em;
  overflow-x: auto;
  line-height: 1.7;
}

/* ---------- Single-entry meta ---------- */

/* Date and category above an article — the list views carry this inside
   .news-row, but a single entry has no grid to sit in. */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9em;
  margin-bottom: 2.2em;
  font-size: 0.86rem;
  color: var(--ink-3);
}

.entry-cat {
  padding: 0.3em 0.9em;
  border: 1px solid var(--hair-strong);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

/* ---------- Paginated post links ---------- */

.page-links {
  display: flex;
  gap: 0.6em;
  margin-top: 2.4em;
  font-size: 0.9rem;
}

/* ---------- Editor alignment helpers ---------- */

.entry-content .aligncenter {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.entry-content .alignleft {
  float: left;
  margin: 0 1.6em 1.2em 0;
}

.entry-content .alignright {
  float: right;
  margin: 0 0 1.2em 1.6em;
}

.entry-content::after {
  content: '';
  display: block;
  clear: both;
}

@media (max-width: 640px) {
  .entry-content .alignleft,
  .entry-content .alignright {
    float: none;
    margin: 0;
  }
}
