/* ── Google Fonts Import ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --c-ink:        #0f0f0f;
  --c-body:       #1a1a1a;
  --c-muted:      #444444;
  --c-accent:     #b83025;
  --c-accent-2:   #c8885a;
  --c-bg:         #fdfcf8;
  --c-surface:    #f5f3ed;
  --c-border:     #d8d4c8;
  --c-highlight:  #fff5d6;

  --font-serif:   'Lora', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius:       6px;
  --max-w:        72ch;
  --transition:   0.2s ease;
}

/* ── Base ────────────────────────────────────────────────── */
.entry-content,
.wp-block-post-content,
article .entry-content {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.05vw + 0.6rem, 1.125rem);
  line-height: 1.85;
  color: #1a1a1a !important;
  max-width: var(--max-w);
}

/* ── Paragraphs ──────────────────────────────────────────── */
.entry-content p,
.wp-block-post-content p {
  color: #1a1a1a !important;
  margin-bottom: 1.5em;
  hyphens: auto;
}

/* Drop cap */
.entry-content > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-size: 3.8em;
  line-height: 0.75;
  float: left;
  margin: 0.05em 0.12em 0 0;
  color: var(--c-accent);
  font-weight: 700;
}

/* ── Headings ────────────────────────────────────────────── */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3,
.wp-block-post-content h4,
.wp-block-post-content h5,
.wp-block-post-content h6 {
  font-family: var(--font-sans) !important;
  color: #0f0f0f !important;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
  position: relative;
}

.entry-content h1,
.wp-block-post-content h1 {
  font-size: clamp(2rem, 3.5vw + 0.8rem, 3rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em;
  padding-bottom: 0.3em;
  border-bottom: 3px solid var(--c-accent);
  display: inline-block;
}

.entry-content h2,
.wp-block-post-content h2 {
  font-size: clamp(1.45rem, 2vw + 0.6rem, 2rem) !important;
  padding-left: 1rem;
  border-left: 4px solid var(--c-accent);
}

.entry-content h3,
.wp-block-post-content h3 {
  font-size: clamp(1.2rem, 1.4vw + 0.5rem, 1.5rem) !important;
}
.entry-content h3::before {
  content: '◆ ';
  color: var(--c-accent);
  font-size: 0.6em;
  vertical-align: middle;
  margin-right: 0.15em;
}

.entry-content h4,
.wp-block-post-content h4 {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent) !important;
}

.entry-content h5,
.wp-block-post-content h5 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #444444 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.entry-content h6,
.wp-block-post-content h6 {
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: #444444 !important;
  font-style: italic;
}

/* ── Links ───────────────────────────────────────────────── */
.entry-content a {
  color: var(--c-accent) !important;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition), color var(--transition);
}
.entry-content a:hover {
  color: #0f0f0f !important;
  text-decoration-color: var(--c-accent);
}

/* ── Blockquote ──────────────────────────────────────────── */
.entry-content blockquote {
  position: relative;
  margin: 2.5em 0;
  padding: 1.8em 2em 1.8em 3em;
  background: var(--c-surface);
  border-left: none !important;
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15em;
  color: #0f0f0f !important;
  line-height: 1.7;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.entry-content blockquote::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 5em;
  color: var(--c-accent);
  opacity: 0.3;
  position: absolute;
  top: -0.1em;
  left: 0.2em;
  line-height: 1;
}
.entry-content blockquote p {
  margin: 0;
  color: #0f0f0f !important;
}
.entry-content blockquote cite,
.entry-content blockquote footer {
  display: block;
  margin-top: 1em;
  font-size: 0.8em;
  font-style: normal;
  font-family: var(--font-sans);
  color: #444444 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.entry-content blockquote cite::before {
  content: '— ';
}

/* ── Horizontal Rule ─────────────────────────────────────── */
.entry-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-border), transparent);
  margin: 3em 0;
  border-radius: 2px;
}

/* ── Lists ───────────────────────────────────────────────── */
.entry-content ul,
.entry-content ol,
.wp-block-post-content ul,
.wp-block-post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
  color: #1a1a1a !important;
}
.entry-content li,
.wp-block-post-content li {
  margin-bottom: 0.5em;
  line-height: 1.75;
  color: #1a1a1a !important;
}
.entry-content ul li::marker {
  color: var(--c-accent);
}
.entry-content ol {
  list-style: none;
  counter-reset: ol-counter;
  padding-left: 2.5em;
}
.entry-content ol > li {
  counter-increment: ol-counter;
  position: relative;
}
.entry-content ol > li::before {
  content: counter(ol-counter, decimal-leading-zero);
  position: absolute;
  left: -2.4em;
  top: 0.05em;
  font-family: var(--font-sans);
  font-size: 0.75em;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: 0.02em;
  width: 2em;
  text-align: right;
}
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

/* ── Tables ──────────────────────────────────────────────── */
.entry-content .wp-block-table,
.entry-content figure.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  display: block;
}

.entry-content table {
  border-collapse: collapse;
  margin: 2.5em 0;
  font-family: var(--font-sans);
  font-size: 0.92em;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  max-width: none;
}

.entry-content thead {
  background: #0f0f0f !important;
}

.entry-content thead th,
.entry-content thead td,
.entry-content thead th *,
.entry-content thead td *,
.entry-content table thead tr th,
.entry-content table thead tr td,
.wp-block-post-content thead th,
.wp-block-post-content thead td {
  padding: 0.85em 1.2em;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78em;
  border: none;
  white-space: nowrap;
  background: #0f0f0f !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

.entry-content tbody tr {
  border-bottom: 1px solid var(--c-border);
  transition: background var(--transition);
}
.entry-content tbody tr:nth-child(even) {
  background: var(--c-surface);
}
.entry-content tbody tr:hover {
  background: var(--c-highlight);
}
.entry-content tbody td {
  padding: 0.8em 1.2em;
  color: #1a1a1a !important;
  border: none;
  vertical-align: top;
  white-space: nowrap;
  min-width: 90px;
}
.entry-content tfoot td {
  padding: 0.8em 1.2em;
  background: var(--c-surface);
  font-weight: 600;
  font-family: var(--font-sans);
  border-top: 2px solid var(--c-border);
  color: #0f0f0f !important;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    font-size: 0.83em;
  }

  .entry-content thead th,
  .entry-content thead td,
  .entry-content thead th *,
  .entry-content thead td *,
  .entry-content table thead tr th,
  .entry-content table thead tr td,
  .wp-block-post-content thead th,
  .wp-block-post-content thead td {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: #0f0f0f !important;
    white-space: normal;
    min-width: 90px;
  }

  .entry-content tbody td,
  .entry-content tfoot td {
    white-space: normal;
    min-width: 90px;
    max-width: 180px;
  }
}

/* ── Code ────────────────────────────────────────────────── */
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--c-surface);
  color: var(--c-accent) !important;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid var(--c-border);
}
.entry-content pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: #0f0f0f;
  color: #e8e6f0 !important;
  padding: 1.5em 1.8em;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.7;
  margin: 2em 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.entry-content pre code {
  background: none;
  border: none;
  color: inherit !important;
  padding: 0;
  font-size: 1em;
}

/* ── kbd ─────────────────────────────────────────────────── */
.entry-content kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--c-surface);
  color: #0f0f0f !important;
  border: 1px solid var(--c-border);
  border-bottom-width: 3px;
  border-radius: 4px;
  padding: 0.1em 0.5em;
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

/* ── Mark ────────────────────────────────────────────────── */
.entry-content mark {
  background: var(--c-highlight);
  color: #0f0f0f !important;
  padding: 0.05em 0.25em;
  border-radius: 3px;
}

/* ── Strong & Em ─────────────────────────────────────────── */
.entry-content strong { font-weight: 700; color: #0f0f0f !important; }
.entry-content em { color: #1a1a1a !important; }

/* Prevent strong inside table headers from overriding th/td color */
.entry-content thead th strong,
.entry-content thead td strong,
.entry-content thead th em,
.entry-content thead td em,
.entry-content thead th *,
.entry-content thead td * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700;
}

/* ── Small ───────────────────────────────────────────────── */
.entry-content small {
  font-family: var(--font-sans);
  font-size: 0.8em;
  color: #444444 !important;
}

/* ── sup / sub ───────────────────────────────────────────── */
.entry-content sup,
.entry-content sub {
  font-size: 0.72em;
  font-family: var(--font-sans);
  color: var(--c-accent) !important;
}

/* ── Figure / Figcaption ─────────────────────────────────── */
.entry-content figure { margin: 2.5em 0; }
.entry-content figcaption {
  font-family: var(--font-sans);
  font-size: 0.82em;
  color: #444444 !important;
  margin-top: 0.6em;
  text-align: center;
  font-style: italic;
  letter-spacing: 0.02em;
}

/* ── Images ──────────────────────────────────────────────── */
.entry-content img {
  border-radius: var(--radius);
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Definition Lists ────────────────────────────────────── */
.entry-content dl { margin: 1.5em 0; }
.entry-content dt {
  font-family: var(--font-sans);
  font-weight: 600;
  color: #0f0f0f !important;
  margin-top: 1em;
  font-size: 0.95em;
  letter-spacing: 0.02em;
}
.entry-content dd {
  margin-left: 1.5em;
  color: #1a1a1a !important;
  border-left: 2px solid var(--c-border);
  padding-left: 1em;
  margin-top: 0.3em;
}

/* ── Details / Summary ───────────────────────────────────── */
.entry-content details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
  background: var(--c-surface);
}
.entry-content summary {
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  color: #0f0f0f !important;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.entry-content summary::before {
  content: '▶';
  font-size: 0.65em;
  color: var(--c-accent);
  transition: transform var(--transition);
}
.entry-content details[open] summary::before { transform: rotate(90deg); }
.entry-content details[open] summary { margin-bottom: 0.8em; }

/* ── Address ─────────────────────────────────────────────── */
.entry-content address {
  font-family: var(--font-sans);
  font-style: normal;
  color: #1a1a1a !important;
  border-left: 3px solid var(--c-border);
  padding-left: 1em;
  margin: 1.5em 0;
}

/* ── WordPress Blocks ────────────────────────────────────── */
.entry-content .wp-block-quote { border-left: none; }

.entry-content .wp-block-button__link,
.entry-content .wp-element-button {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: opacity var(--transition), transform var(--transition);
}
.entry-content .wp-block-button__link:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.entry-content .wp-block-pullquote {
  border-top: 3px solid var(--c-accent);
  border-bottom: 3px solid var(--c-accent);
  padding: 1.5em 0;
  margin: 3em 0;
}
.entry-content .wp-block-pullquote blockquote {
  background: none;
  box-shadow: none;
  padding: 0;
  font-size: 1.4em;
  text-align: center;
}
.entry-content .wp-block-pullquote blockquote::before { display: none; }

.entry-content .wp-block-separator {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
  margin: 3em auto;
  max-width: 200px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .entry-content h1 { font-size: 1.9rem !important; }
  .entry-content h2 { font-size: 1.45rem !important; }
  .entry-content h3 { font-size: 1.2rem !important; }
  .entry-content blockquote { padding: 1.2em 1.5em 1.2em 2em; font-size: 1em; }
  .entry-content > p:first-of-type::first-letter { font-size: 3em; }
}

/* Dark mode intentionally disabled — site uses light theme only */