/* KGS Studio theme — ordinary pages, posts, 404, and the no-plugin fallback.
   Uses the same tokens as the KGS sections (defined by the plugin bundle),
   with literal fallbacks so these pages stay readable without the plugin. */

body.kgs-page-shell {
  margin: 0;
  background: var(--navy, #0b1320);
  color: var(--on-dark, #f4f1e6);
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  line-height: 1.7;
}

.kgs-page {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(760px + 2 * var(--gutter, 1.5rem));
  margin-inline: auto;
  padding: calc(var(--header-h, 92px) + clamp(3rem, 6vw, 6rem)) var(--gutter, 1.5rem) clamp(4rem, 8vw, 8rem);
  min-height: 60vh;
}
.kgs-page__meta {
  margin: 0 0 1rem;
  font-size: var(--fs-micro, 0.72rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #c9a227);
}
.kgs-page__title {
  margin: 0 0 2rem;
  font-family: var(--serif, 'Playfair Display', serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.kgs-page__content > * + * {
  margin-top: 1.1em;
}
.kgs-page__content h2,
.kgs-page__content h3 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 2em;
}
.kgs-page__content a,
.kgs-page__link {
  color: var(--gold-soft, #d9bd62);
  text-underline-offset: 0.2em;
}
.kgs-page__content img,
.kgs-page__media img {
  max-width: 100%;
  height: auto;
}
.kgs-page__media {
  margin: 0 0 2rem;
}
.kgs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hair-dark, rgba(244, 241, 230, 0.14));
}
.kgs-list__item a {
  display: flex;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hair-dark, rgba(244, 241, 230, 0.14));
  color: inherit;
  text-decoration: none;
}
.kgs-list__date {
  flex: 0 0 9rem;
  color: var(--gold, #c9a227);
  font-size: var(--fs-small, 0.85rem);
}
.kgs-list__item a:hover .kgs-list__title,
.kgs-list__item a:focus-visible .kgs-list__title {
  color: var(--gold-soft, #d9bd62);
}

/* fallback header/footer (only when KGS Studio Core is inactive) */
.kgs-fallback-header,
.kgs-fallback-footer,
.kgs-fallback-notice {
  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
}
.kgs-fallback-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
.kgs-fallback-header ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.kgs-fallback-header a,
.kgs-fallback-brand {
  color: inherit;
}
.kgs-fallback-notice {
  color: var(--gold, #c9a227);
}
.kgs-fallback-header + .kgs-fallback-notice + main .kgs-page,
.kgs-fallback-header + main .kgs-page {
  padding-top: 3rem;
}

@media (max-width: 600px) {
  .kgs-list__item a {
    flex-direction: column;
    gap: 0.25rem;
  }
}
