/* ==========================================================================
   Base — typography / layout rules GP cannot express via options
   ========================================================================== */

/* --- Reset helpers --- */
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

/* --- Single post — centered header + footer meta (full width) --- */
.single .entry-header,
.single footer.entry-meta {
  text-align: center;
}
.single footer.entry-meta {
  margin-bottom: 1.5rem;
}
.single footer.entry-meta .sl-topic-labels {
  justify-content: center;
}

/* --- Heading top margins --- */
h2, h3 {
  margin-top: var(--sl-space-heading-top);
}

h4, h5, h6 {
  margin-top: var(--sl-space-subheading-top);
}

.entry-content > :first-child,
.post-content > :first-child {
  margin-top: 0;
}

/* --- Letter spacing --- */
h1, h2 {
  letter-spacing: -0.01em;
}

h6 {
  letter-spacing: 0.05em;
}

/* --- Content measure — center narrow text column, images stay full width --- */
.entry-content p,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table,
.post-content p {
  max-width: var(--sl-measure);
  margin-left: auto;
  margin-right: auto;
}

/* Keep list markers inside the max-width box so they don't overflow on mobile */
.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
}

/* --- Lead paragraph --- */
.entry-content .lead,
.entry-content > p:first-of-type {
  font-size: var(--sl-text-lead);
  line-height: var(--sl-leading-quote);
  margin-bottom: 1.18rem;
}

/* --- Link underline styling (structural hover) --- */
.entry-content a,
.post-content a {
  color: var(--sl-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 0.15s, color 0.15s;
}

.entry-content a:hover,
.post-content a:hover {
  color: var(--sl-link-hover);
  text-decoration-thickness: 2px;
}

.entry-content a:visited,
.post-content a:visited {
  color: var(--sl-link-visited);
}

/* --- Blockquote --- */
blockquote {
  font-size: var(--sl-text-lg);
  font-style: italic;
  line-height: var(--sl-leading-quote);
  color: var(--sl-text-body);
  background: var(--sl-bg-subtle);
  border-left: 4px solid var(--sl-rose);
  padding: 1.18rem 1.41rem;
  margin: 1.41rem 0;
}

/* --- Meta / captions --- */
.entry-meta,
.post-meta,
figcaption,
.wp-caption-text {
  font-size: var(--sl-text-sm);
  line-height: var(--sl-leading-small);
  color: var(--sl-text-meta);
}

/* --- Sponsored label (inline in header meta after author) --- */
.sl-sponsored-label {
  color: var(--sl-text-meta);
  font-style: italic;
}

/* --- Category labels --- */
.category-label {
  font-family: var(--sl-font-body);
  font-size: var(--sl-text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: var(--sl-leading-ui);
}

/* --- Footer meta taxonomy pills (single post) --- */
.entry-meta .cat-links {
    display: inline-flex;
    align-items: center;
}
.entry-meta .cat-links .gp-icon {
    display: none;
}
.entry-meta .cat-links a {
    font-size: var(--sl-text-md);
    font-weight: 700;
    color: var(--sl-plum);
    text-decoration: none;
    border: 1.5px solid var(--sl-plum);
    padding: 0.15rem 0.65rem;
    border-radius: var(--sl-radius-sm);
    line-height: var(--sl-leading-ui);
}
.entry-meta .cat-links a:hover {
    color: var(--sl-rose);
    border-color: var(--sl-rose);
}

/* --- Search results — category pill above featured image --- */
.search .sl-search-cat {
    text-align: left;
    margin: 0.5rem 0 0;
}

.sl-topic-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}
.sl-topic-labels a {
    font-size: var(--sl-text-sm);
    color: var(--sl-text-meta);
    text-decoration: none;
    border: 1px solid var(--sl-border-light);
    padding: 0.1rem 0.5rem;
    border-radius: var(--sl-radius-sm);
    line-height: var(--sl-leading-ui);
}
.sl-topic-labels a:hover {
    color: var(--sl-rose);
    border-color: var(--sl-rose);
}
.qb-card__body .sl-topic-labels {
    margin-top: 0.5rem;
}
.qb-hero__body .sl-topic-labels {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

/* --- Buttons — letter spacing --- */
.button,
button,
input[type="submit"] {
  letter-spacing: 0.02em;
}

/* --- Focus states (WCAG 2.2) --- */
:focus-visible {
  outline: 2px solid var(--sl-focus);
  outline-offset: 2px;
}

.site-footer :focus-visible,
.button-secondary:focus-visible {
  outline-color: var(--sl-focus-dark);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --- Footer --- */
.site-footer {
  font-size: var(--sl-text-md);
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* --- Language list (footer) --- */
.ml-lang-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ml-lang-list li {
  margin-bottom: 0.35em;
}

.ml-lang-list__current {
  font-weight: 700;
}

/* --- Multilingual support --- */
.entry-content,
.post-content {
  hyphens: auto;
  -webkit-hyphens: auto;
}
