/* v0.1.0 typography baseline */

:root {
  --ti-body-font-size: 17px;
  --ti-body-line-height: 1.72;
  --ti-body-color: #2f3a45;
  --ti-heading-color: #111111;
  --ti-accent-color: #c0392b;
}

/* -----------------------------------------------
   Base content font
   ----------------------------------------------- */

.single article .post-content,
.page article .post-content {
  font-size: var(--ti-body-font-size);
  line-height: var(--ti-body-line-height);
  color: var(--ti-body-color);
}

/* -----------------------------------------------
   Paragraph rhythm + override parent justify
   ----------------------------------------------- */

/* Override the parent theme's text-align: justify */
.post-content > p,
.single article .post-content > p,
.page article .post-content > p {
  text-align: left !important;
  margin: 0 0 1.3em;
}

/* -----------------------------------------------
   Heading scale — applies to pages (.page context).
   For .single the same values are set in single-post.css
   so both files stay in sync.
   ----------------------------------------------- */

.post-content h1 {
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 1.4em 0 0.45em;
  color: var(--ti-heading-color);
}

.post-content h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 1.3em 0 0.4em;
  color: var(--ti-heading-color);
}

.post-content h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 1.2em 0 0.38em;
  color: var(--ti-heading-color);
}

.post-content h4 {
  font-size: 1.0rem;
  line-height: 1.4;
  margin: 1.1em 0 0.35em;
  color: var(--ti-heading-color);
}

.post-content h5,
.post-content h6 {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 1em 0 0.3em;
  color: #555;
}

/* -----------------------------------------------
   Lists
   ----------------------------------------------- */

.single article .post-content ul,
.single article .post-content ol,
.page article .post-content ul,
.page article .post-content ol {
  margin: 0 0 1.3em 1.5em;
  line-height: 1.75;
}

.single article .post-content li,
.page article .post-content li {
  margin-bottom: 0.4em;
}

/* -----------------------------------------------
   Blockquote
   ----------------------------------------------- */

.single article .post-content blockquote,
.page article .post-content blockquote {
  border-left: 4px solid var(--ti-accent-color);
  padding: 0.6em 0 0.6em 1.4em;
  margin: 1.5em 0;
  color: #4a4a4a;
  font-style: italic;
  font-size: 1.05em;
}

.single article .post-content blockquote p,
.page article .post-content blockquote p {
  line-height: 1.6 !important;
  margin-bottom: 0.5em !important;
}

.single article .post-content blockquote p:last-child,
.page article .post-content blockquote p:last-child {
  margin-bottom: 0 !important;
}

/* Pull-quote (Gutenberg wp-block-pullquote) */
.single article .post-content .wp-block-pullquote,
.page article .post-content .wp-block-pullquote {
  border-top: 3px solid var(--ti-accent-color);
  border-bottom: 3px solid var(--ti-accent-color);
  border-left: 0;
  padding: 1.2em 0;
  text-align: center;
  margin: 2em 0;
}

/* -----------------------------------------------
   Images and figcaptions
   ----------------------------------------------- */

.single article .post-content figure,
.page article .post-content figure {
  margin: 1.5em 0;
}

.single article .post-content figcaption,
.page article .post-content figcaption,
.single article .post-content .wp-caption-text,
.page article .post-content .wp-caption-text {
  font-size: 0.82em;
  line-height: 1.4;
  color: #777;
  text-align: center;
  padding: 0.4em 0.6em 0;
  font-style: italic;
}

/* -----------------------------------------------
   Pre / Code
   ----------------------------------------------- */

.single article .post-content pre,
.page article .post-content pre {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 1.2em 1.4em;
  font-size: 0.88em;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  margin: 1.5em 0;
}

.single article .post-content code,
.page article .post-content code {
  background: #f0f0f0;
  padding: 0.15em 0.35em;
  border-radius: 2px;
  font-size: 0.88em;
}

/* -----------------------------------------------
   Tables
   ----------------------------------------------- */

.single article .post-content table,
.page article .post-content table {
  width: 100%;
  display: block;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.92em;
}

/* -----------------------------------------------
   Horizontal rules
   ----------------------------------------------- */

.single article .post-content hr,
.page article .post-content hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 2em 0;
}

/* -----------------------------------------------
   Mobile typography
   ----------------------------------------------- */

@media screen and (max-width: 768px) {
  :root {
    --ti-body-font-size: 16px;
    --ti-body-line-height: 1.68;
  }

  .post-content h1 { font-size: 1.35rem; }
  .post-content h2 { font-size: 1.15rem; }
  .post-content h3 { font-size: 1.05rem; }
  .post-content h4,
  .post-content h5,
  .post-content h6 { font-size: 0.9rem; }
}

/* -----------------------------------------------
   Sticky navigation — visual state only
   Positioning is applied by sticky-nav.js via
   inline styles. These rules only add background
   and shadow fallback for elements that may need
   overriding parent-theme styles at rest.
   ----------------------------------------------- */

#main-nav {
  background: #fff;   /* ensure white background at all times */
}
