/*
Theme Name: Rustic Grail
Theme URI: https://rusticgrail.com/
Author: Ken Mejorada
Description: A warm, editorial WordPress theme for home, garden, homesteading, outdoor, and simple-living stories. Built for the native Gutenberg editor with no page-builder dependency.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: rustic-grail
Tags: blog, one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks, block-styles, editor-style
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --rg-paper: #f4efe5;
  --rg-paper-deep: #ded4c2;
  --rg-white: #fbf8f1;
  --rg-ink: #25271f;
  --rg-muted: #625f52;
  --rg-clay: #8a5432;
  --rg-clay-deep: #5e3823;
  --rg-clay-soft: #b8936f;
  --rg-sage: #4f5c42;
  --rg-sage-soft: #b9b9a2;
  --rg-line: #cdbfa9;
  --rg-sun: #b87d2e;
  --rg-shadow: 0 20px 55px rgba(54, 43, 31, 0.14);
  --rg-shadow-small: 0 9px 28px rgba(54, 43, 31, 0.11);
  --rg-radius: 5px;
  --rg-radius-small: 3px;
  --rg-content: 760px;
  --rg-wide: 1200px;
  --rg-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --rg-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--rg-ink);
  background: var(--rg-paper);
  background-image: url("assets/images/paper-grain.svg");
  background-size: 360px 360px;
  font-family: var(--rg-sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--rg-clay-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rg-clay); }

button,
input,
textarea,
select { font: inherit; }

button,
[type="button"],
[type="submit"] { cursor: pointer; }

:focus-visible {
  outline: 3px solid rgba(165, 111, 79, 0.45);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  clip: auto !important;
  width: auto;
  height: auto;
  top: 10px;
  left: 10px;
  z-index: 100000;
  padding: 12px 18px;
  color: var(--rg-ink);
  background: var(--rg-white);
  border-radius: 8px;
  box-shadow: var(--rg-shadow-small);
}

.rg-container { width: min(calc(100% - 40px), var(--rg-wide)); margin-inline: auto; }
.rg-narrow { width: min(calc(100% - 40px), var(--rg-content)); margin-inline: auto; }
.rg-section { padding: clamp(64px, 9vw, 112px) 0; }
.rg-section--compact { padding: clamp(44px, 6vw, 72px) 0; }
.rg-section--white { background: var(--rg-white); }
.rg-section--tint { background: var(--rg-paper-deep); }

.rg-kicker,
.rg-eyebrow,
.rg-card__category,
.rg-post-kicker {
  margin: 0 0 14px;
  color: var(--rg-clay-deep);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.55em;
  color: var(--rg-ink);
  font-family: var(--rg-serif);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.6rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(2.15rem, 4vw, 3.7rem); letter-spacing: -0.035em; }
h3 { font-size: clamp(1.45rem, 2.2vw, 2rem); letter-spacing: -0.02em; }
h4 { font-size: 1.28rem; }

p { margin: 0 0 1.35em; }

.rg-lede { max-width: 700px; color: var(--rg-muted); font-size: clamp(1.05rem, 1.5vw, 1.24rem); }

.rg-button,
.wp-block-button__link,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  color: #fff;
  background: var(--rg-clay);
  border: 1px solid var(--rg-clay);
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.rg-button:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover {
  color: #fff;
  background: var(--rg-clay-deep);
  border-color: var(--rg-clay-deep);
  box-shadow: 0 9px 24px rgba(131, 82, 55, 0.18);
  transform: translateY(-2px);
}

.rg-button--ghost {
  color: var(--rg-ink);
  background: transparent;
  border-color: var(--rg-line);
}

.rg-button--ghost:hover { color: var(--rg-ink); background: var(--rg-white); border-color: var(--rg-clay-soft); }
.rg-text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 720; text-decoration: none; }
.rg-text-link::after { content: "→"; transition: transform 160ms ease; }
.rg-text-link:hover::after { transform: translateX(4px); }

/* Header */
.rg-site-header {
  position: relative;
  z-index: 100;
  background: rgba(244, 239, 229, 0.95);
  border-bottom: 1px solid rgba(205, 191, 169, 0.85);
  backdrop-filter: blur(14px);
}

.rg-site-header.is-sticky { position: sticky; top: 0; }
.admin-bar .rg-site-header.is-sticky { top: 32px; }

.rg-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 82px;
  gap: 30px;
}

.rg-wordmark {
  color: var(--rg-ink);
  font-family: var(--rg-serif);
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.rg-wordmark:hover { color: var(--rg-clay-deep); }
.rg-wordmark__mark { color: var(--rg-clay); }

.rg-primary-nav { justify-self: center; }
.rg-menu { display: flex; align-items: center; gap: clamp(18px, 2.3vw, 32px); margin: 0; padding: 0; list-style: none; }
.rg-menu li { position: relative; margin: 0; }
.rg-menu a { color: var(--rg-ink); font-size: 0.82rem; font-weight: 690; letter-spacing: 0.02em; text-decoration: none; }
.rg-menu a:hover,
.rg-menu .current-menu-item > a,
.rg-menu .current-menu-ancestor > a { color: var(--rg-clay-deep); }

.rg-menu .sub-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: -18px;
  min-width: 220px;
  margin: 0;
  padding: 12px;
  visibility: hidden;
  opacity: 0;
  list-style: none;
  background: var(--rg-white);
  border: 1px solid var(--rg-line);
  border-radius: 3px;
  box-shadow: var(--rg-shadow);
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.rg-menu .sub-menu a { display: block; padding: 9px 10px; border-radius: 8px; }
.rg-menu .sub-menu a:hover { background: var(--rg-paper); }
.rg-menu li:hover > .sub-menu,
.rg-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: translateY(0); }

.rg-header-actions { display: flex; align-items: center; gap: 9px; }
.rg-search-toggle,
.rg-menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--rg-ink);
  background: transparent;
  border: 1px solid var(--rg-line);
  border-radius: 3px;
}
.rg-search-toggle:hover,
.rg-menu-toggle:hover { background: var(--rg-white); border-color: var(--rg-clay-soft); }
.rg-menu-toggle { display: none; }

.rg-search-panel { display: none; padding: 18px 0 24px; border-top: 1px solid var(--rg-line); }
.rg-search-panel.is-open { display: block; }
.rg-search-form { display: flex; gap: 10px; max-width: 720px; margin-inline: auto; }
.rg-search-form label { flex: 1; }
.rg-search-form input[type="search"] {
  width: 100%;
  min-height: 50px;
  padding: 11px 16px;
  color: var(--rg-ink);
  background: var(--rg-white);
  border: 1px solid var(--rg-line);
  border-radius: 3px;
}
.rg-search-form button { flex: none; }

/* Hero */
.rg-hero { position: relative; overflow: hidden; padding: clamp(54px, 8vw, 104px) 0 clamp(70px, 9vw, 118px); }
.rg-hero::before {
  content: "";
  position: absolute;
  width: 660px;
  height: 530px;
  top: -150px;
  right: -120px;
  background: url("assets/images/contour-lines.svg") center / contain no-repeat;
  opacity: .34;
  pointer-events: none;
}
.rg-hero__intro { max-width: 800px; margin-bottom: clamp(42px, 6vw, 72px); }
.rg-hero__title { max-width: 950px; }
.rg-hero__title em { color: var(--rg-clay); font-weight: 500; }
.rg-hero__actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }

.rg-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  min-height: 480px;
  overflow: hidden;
  background: var(--rg-white);
  border: 1px solid var(--rg-line);
  border-radius: var(--rg-radius);
  box-shadow: var(--rg-shadow);
}

.rg-featured__media { min-height: 440px; overflow: hidden; background: var(--rg-sage); }
.rg-featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 650ms cubic-bezier(.2,.7,.2,1); }
.rg-featured:hover .rg-featured__media img { transform: scale(1.025); }
.rg-featured__placeholder,
.rg-card__placeholder {
	display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  background: var(--rg-sage) url("assets/images/field-placeholder.svg") center / cover no-repeat;
}
.rg-featured__placeholder::before,
.rg-card__placeholder::before {
  display: none;
}
.rg-featured__placeholder::after,
.rg-card__placeholder::after {
  display: none;
}

.rg-featured__content { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 64px); }
.rg-featured__title { font-size: clamp(2rem, 3.3vw, 3.35rem); }
.rg-featured__title a { color: inherit; text-decoration: none; }
.rg-featured__title a:hover { color: var(--rg-clay-deep); }
.rg-featured__excerpt { color: var(--rg-muted); }

.rg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--rg-muted); font-size: 0.78rem; font-weight: 620; }
.rg-meta > * + *::before { content: "·"; margin-right: 9px; color: var(--rg-clay-soft); }

/* Cards and category paths */
.rg-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.rg-section-heading > div { max-width: 720px; }
.rg-section-heading h2 { margin-bottom: 8px; }
.rg-section-heading p { margin: 0; color: var(--rg-muted); }

.rg-path-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.rg-path-card {
  position: relative;
  min-height: 270px;
  padding: 28px 24px;
  overflow: hidden;
  color: var(--rg-ink);
  background: rgba(251, 248, 241, .72);
  border: 1px solid var(--rg-line);
  border-radius: var(--rg-radius);
  text-decoration: none;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.rg-path-card:hover { color: var(--rg-ink); border-color: var(--rg-clay-soft); box-shadow: var(--rg-shadow-small); transform: translateY(-5px); }
.rg-path-card::after {
  content: "";
  position: absolute;
  width: calc(100% - 48px);
  height: 2px;
  left: 24px;
  bottom: 20px;
  background: var(--path-color, var(--rg-clay-soft));
  opacity: .85;
  transform-origin: left;
  transition: transform 300ms ease;
}
.rg-path-card:hover::after { transform: scaleX(.55); }
.rg-path-card__number { display: block; margin-bottom: 48px; color: var(--rg-clay-deep); font-family: var(--rg-sans); font-size: 0.7rem; font-weight: 760; letter-spacing: .14em; }
.rg-path-card h3 { font-size: 1.43rem; }
.rg-path-card p { margin: 0; color: var(--rg-muted); font-size: 0.84rem; line-height: 1.55; }

.rg-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 3vw, 34px); }
.rg-card { min-width: 0; }
.rg-card__media { display: block; aspect-ratio: 4 / 3; margin-bottom: 20px; overflow: hidden; background: var(--rg-sage); border-radius: var(--rg-radius); }
.rg-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.2,.7,.2,1); }
.rg-card:hover .rg-card__media img { transform: scale(1.035); }
.rg-card__placeholder { min-height: 100%; }
.rg-card__title { margin-bottom: 10px; font-size: clamp(1.48rem, 2.3vw, 2rem); }
.rg-card__title a { color: inherit; text-decoration: none; }
.rg-card__title a:hover { color: var(--rg-clay-deep); }
.rg-card__excerpt { margin-bottom: 14px; color: var(--rg-muted); font-size: 0.92rem; line-height: 1.65; }

.rg-note-banner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
  padding: clamp(38px, 6vw, 72px);
  color: #f6f0e5;
  background: var(--rg-sage) url("assets/images/contour-lines.svg") 108% 50% / 58% auto no-repeat;
  border: 1px solid #3f4936;
  border-radius: var(--rg-radius);
}
.rg-note-banner__mark { display: grid; place-items: center; min-height: 280px; border: 1px solid rgba(246, 240, 229, .38); border-radius: 2px; }
.rg-note-banner__mark span { max-width: 230px; color: #e5d0ad; font-family: var(--rg-serif); font-size: clamp(2.1rem, 4vw, 3.9rem); font-style: italic; line-height: 0.95; text-align: center; transform: rotate(-2deg); }
.rg-note-banner h2 { max-width: 650px; color: #fffaf0; }
.rg-note-banner .rg-kicker { color: #d9ba8c; }
.rg-note-banner .rg-lede { color: #d7d4c7; }

/* Archive and search */
.rg-page-header { padding: clamp(64px, 8vw, 104px) 0 50px; text-align: center; }
.rg-page-header__inner { max-width: 820px; margin-inline: auto; }
.rg-page-header h1 { font-size: clamp(2.65rem, 5vw, 4.8rem); }
.rg-page-header p { color: var(--rg-muted); }
.rg-child-categories { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 28px 0 0; padding: 0; list-style: none; }
.rg-child-categories a { display: inline-flex; padding: 8px 14px; color: var(--rg-ink); background: var(--rg-white); border: 1px solid var(--rg-line); border-radius: 2px; font-size: 0.8rem; font-weight: 680; text-decoration: none; }
.rg-child-categories a:hover { border-color: var(--rg-clay-soft); }

.rg-pagination { margin-top: 56px; }
.rg-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rg-pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; color: var(--rg-ink); background: var(--rg-white); border: 1px solid var(--rg-line); border-radius: 2px; text-decoration: none; }
.rg-pagination .current,
.rg-pagination a:hover { color: #fff; background: var(--rg-clay); border-color: var(--rg-clay); }

.rg-empty { max-width: 650px; margin: 0 auto; padding: 55px 30px; text-align: center; background: var(--rg-white); border: 1px solid var(--rg-line); border-radius: var(--rg-radius); }

/* Single post and pages */
.rg-post-header { padding: clamp(62px, 8vw, 105px) 0 46px; text-align: center; }
.rg-post-header__inner { max-width: 960px; margin-inline: auto; }
.rg-post-header h1 { font-size: clamp(2.75rem, 5.7vw, 5.45rem); }
.rg-post-header .rg-meta { justify-content: center; margin-top: 24px; }
.rg-breadcrumbs { margin-bottom: 25px; color: var(--rg-muted); font-size: 0.78rem; }
.rg-breadcrumbs a { color: inherit; text-decoration: none; }
.rg-breadcrumbs a:hover { color: var(--rg-clay-deep); }
.rg-post-hero-image { width: min(calc(100% - 40px), 1280px); max-height: 760px; margin: 0 auto clamp(54px, 7vw, 85px); object-fit: cover; border-radius: var(--rg-radius); }

.rg-content { width: min(calc(100% - 40px), var(--rg-content)); margin-inline: auto; }
.rg-content > * { margin-top: 0; margin-bottom: 1.4em; }
.rg-content > h2 { margin-top: 1.8em; }
.rg-content > h3 { margin-top: 1.65em; }
.rg-content a { font-weight: 620; }
.rg-content ul,
.rg-content ol { padding-left: 1.25em; }
.rg-content li { margin-bottom: 0.55em; }
.rg-content blockquote,
.wp-block-quote {
  margin: 2.2em 0;
  padding: 10px 0 10px 28px;
  color: var(--rg-ink);
  border-left: 3px solid var(--rg-clay);
  font-family: var(--rg-serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.5;
}
.rg-content figure { margin-top: 2.2em; margin-bottom: 2.2em; }
.rg-content figcaption { margin-top: 8px; color: var(--rg-muted); font-size: 0.76rem; text-align: center; }
.rg-content .alignwide { width: min(100vw - 40px, 1100px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.rg-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.rg-content table { width: 100%; border-collapse: collapse; }
.rg-content th,
.rg-content td { padding: 12px; border: 1px solid var(--rg-line); text-align: left; }
.rg-content code { padding: 2px 5px; background: var(--rg-paper-deep); border-radius: 4px; font-size: 0.9em; }
.rg-content pre { overflow-x: auto; padding: 22px; background: var(--rg-ink); color: var(--rg-white); border-radius: 12px; }

.rg-post-footer { width: min(calc(100% - 40px), var(--rg-content)); margin: 58px auto 0; }
.rg-tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.rg-tag-list a { padding: 7px 13px; color: var(--rg-muted); background: var(--rg-white); border: 1px solid var(--rg-line); border-radius: 2px; font-size: 0.77rem; text-decoration: none; }
.rg-author-box { display: grid; grid-template-columns: 76px 1fr; gap: 22px; padding: 28px; background: var(--rg-white); border: 1px solid var(--rg-line); border-radius: var(--rg-radius); }
.rg-author-box img { border-radius: 50%; }
.rg-author-box h2 { margin-bottom: 8px; font-size: 1.55rem; }
.rg-author-box p { margin: 0; color: var(--rg-muted); font-size: 0.91rem; }

.rg-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 42px; }
.rg-post-nav a { display: block; min-height: 130px; padding: 22px; color: var(--rg-ink); background: var(--rg-white); border: 1px solid var(--rg-line); border-radius: var(--rg-radius-small); text-decoration: none; }
.rg-post-nav a:hover { border-color: var(--rg-clay-soft); box-shadow: var(--rg-shadow-small); }
.rg-post-nav__label { display: block; margin-bottom: 8px; color: var(--rg-muted); font-size: 0.72rem; font-weight: 720; letter-spacing: 0.1em; text-transform: uppercase; }
.rg-post-nav__next { text-align: right; }

.rg-related { margin-top: clamp(70px, 9vw, 110px); padding: clamp(62px, 8vw, 96px) 0; background: var(--rg-paper-deep); }

.rg-page-shell { padding: clamp(64px, 8vw, 105px) 0; }
.rg-page-shell__header { max-width: 830px; margin: 0 auto 48px; text-align: center; }
.rg-page-shell__header h1 { font-size: clamp(2.8rem, 5vw, 5rem); }

.rg-about-intro { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(35px, 7vw, 92px); align-items: start; margin-bottom: 76px; }
.rg-about-seal { display: grid; place-items: center; aspect-ratio: 4 / 5; max-width: 390px; margin-inline: auto; background: var(--rg-sage) url("assets/images/contour-lines.svg") center / 145% auto no-repeat; border: 8px solid var(--rg-white); border-radius: 2px; box-shadow: 0 0 0 1px var(--rg-line), var(--rg-shadow-small); }
.rg-about-seal span { max-width: 230px; color: #ead8b9; font-family: var(--rg-serif); font-size: clamp(2rem, 4vw, 3.45rem); font-style: italic; line-height: 1; text-align: center; transform: rotate(-2deg); }

/* Forms and comments */
.rg-form { display: grid; gap: 20px; margin-top: 34px; }
.rg-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rg-form label { display: block; margin-bottom: 7px; font-size: 0.8rem; font-weight: 720; }
.rg-form input:not([type="submit"]),
.rg-form textarea,
.comment-form input:not([type="submit"]),
.comment-form textarea {
  width: 100%;
  padding: 13px 15px;
  color: var(--rg-ink);
  background: var(--rg-white);
  border: 1px solid var(--rg-line);
  border-radius: 2px;
}
.rg-form input:focus,
.rg-form textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--rg-clay); outline: 3px solid rgba(165,111,79,.14); }
.rg-honeypot { position: absolute; left: -9999px; }
.rg-alert { margin-bottom: 25px; padding: 14px 18px; border-radius: 10px; font-size: 0.9rem; }
.rg-alert--success { color: #3e5539; background: #e5edde; border: 1px solid #c7d7bc; }
.rg-alert--error { color: #7b3e34; background: #f5e0dc; border: 1px solid #e4beb6; }

.comments-area { width: min(calc(100% - 40px), var(--rg-content)); margin: 76px auto 0; }
.comment-list { padding: 0; list-style: none; }
.comment-list .children { padding-left: 30px; list-style: none; }
.comment-body { margin-bottom: 20px; padding: 22px; background: var(--rg-white); border: 1px solid var(--rg-line); border-radius: 3px; }
.comment-meta { font-size: 0.8rem; }

/* Footer */
.rg-site-footer { color: #f5eee6; background: #292b25; background-image: url("assets/images/paper-grain.svg"); }
.rg-footer-main { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: clamp(34px, 6vw, 90px); padding: clamp(62px, 8vw, 96px) 0; }
.rg-footer-brand .rg-wordmark { color: #fffaf4; }
.rg-footer-brand p { max-width: 430px; margin-top: 20px; color: #cfc6bb; }
.rg-footer-title { margin-bottom: 17px; color: #f5eee6; font-family: var(--rg-sans); font-size: 0.75rem; font-weight: 760; letter-spacing: 0.12em; text-transform: uppercase; }
.rg-footer-menu { margin: 0; padding: 0; list-style: none; }
.rg-footer-menu li { margin-bottom: 9px; }
.rg-footer-menu a { color: #d9d0c5; font-size: 0.88rem; text-decoration: none; }
.rg-footer-menu a:hover { color: #fff; }
.rg-footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 21px 0; color: #aaa197; border-top: 1px solid rgba(255,255,255,.12); font-size: 0.75rem; }
.rg-social-links { display: flex; flex-wrap: wrap; gap: 14px; }
.rg-social-links a { color: #d9d0c5; text-decoration: none; }

/* 404 */
.rg-404 { display: grid; place-items: center; min-height: 65vh; padding: 70px 20px; text-align: center; }
.rg-404__number { margin-bottom: 10px; color: var(--rg-clay-soft); font-family: var(--rg-serif); font-size: clamp(7rem, 22vw, 15rem); font-weight: 600; letter-spacing: -0.08em; line-height: 0.7; }
.rg-404 p { max-width: 560px; color: var(--rg-muted); }

/* WordPress essentials */
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption { color: var(--rg-muted); font-size: .78rem; }
.bypostauthor { outline: 1px solid var(--rg-clay-soft); }
.sticky .rg-card__category::before { content: "Featured · "; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-right: auto; margin-left: auto; }

@media (max-width: 1050px) {
  .rg-header-inner { grid-template-columns: auto 1fr auto; }
  .rg-primary-nav { position: fixed; inset: 83px 0 auto; display: none; max-height: calc(100vh - 83px); padding: 24px 20px 40px; overflow-y: auto; background: var(--rg-paper); border-bottom: 1px solid var(--rg-line); }
  .rg-primary-nav.is-open { display: block; }
  .rg-menu { display: block; }
  .rg-menu li { border-bottom: 1px solid var(--rg-line); }
  .rg-menu a { display: block; padding: 14px 4px; font-size: .95rem; }
  .rg-menu .sub-menu { position: static; display: block; min-width: 0; padding: 0 0 10px 16px; visibility: visible; opacity: 1; background: transparent; border: 0; box-shadow: none; transform: none; }
  .rg-menu .sub-menu li { border: 0; }
  .rg-menu .sub-menu a { padding: 8px 4px; color: var(--rg-muted); }
  .rg-menu-toggle { display: inline-grid; }
  .rg-path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rg-path-card:nth-child(4), .rg-path-card:nth-child(5) { min-height: 220px; }
}

@media (max-width: 782px) {
  .admin-bar .rg-site-header.is-sticky { top: 46px; }
  .rg-featured { grid-template-columns: 1fr; }
  .rg-featured__media { min-height: 350px; aspect-ratio: 16 / 10; }
  .rg-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg-note-banner,
  .rg-about-intro { grid-template-columns: 1fr; }
  .rg-note-banner__mark { min-height: 220px; }
  .rg-footer-main { grid-template-columns: 1fr 1fr; }
  .rg-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .rg-container,
  .rg-narrow,
  .rg-content,
  .rg-post-footer,
  .comments-area { width: min(calc(100% - 28px), var(--rg-wide)); }
  .rg-header-inner { min-height: 72px; gap: 12px; }
  .rg-primary-nav { inset: 73px 0 auto; max-height: calc(100vh - 73px); }
  .rg-wordmark { font-size: 1.55rem; }
  .rg-search-toggle,
  .rg-menu-toggle { width: 39px; height: 39px; }
  .rg-search-form { display: grid; }
  .rg-hero { padding-top: 45px; }
  .rg-featured__media { min-height: 250px; }
  .rg-featured__content { padding: 28px 24px 32px; }
  .rg-section-heading { display: block; }
  .rg-section-heading .rg-text-link { margin-top: 16px; }
  .rg-path-grid,
  .rg-post-grid { grid-template-columns: 1fr; }
  .rg-path-card,
  .rg-path-card:nth-child(4),
  .rg-path-card:nth-child(5) { min-height: 190px; }
  .rg-path-card__number { margin-bottom: 22px; }
  .rg-note-banner { padding: 30px 22px; }
  .rg-form__row,
  .rg-post-nav { grid-template-columns: 1fr; }
  .rg-post-nav__next { text-align: left; }
  .rg-author-box { grid-template-columns: 58px 1fr; padding: 21px; }
  .rg-footer-main { grid-template-columns: 1fr; }
  .rg-footer-brand { grid-column: auto; }
  .rg-footer-bottom { display: block; }
  .rg-footer-bottom > * + * { margin-top: 9px; }
  .alignleft, .alignright { float: none; margin: 1.5em auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
