:root {
  --jmx-color-background: #f7f3ec;
  --jmx-color-surface: #eee7dc;
  --jmx-color-text: #1b1917;
  --jmx-color-muted: #6b655e;
  --jmx-color-primary: #0d0d0c;
  --jmx-color-accent: #74151b;
  --jmx-color-accent-dark: #571015;
  --jmx-color-gold: #b99a64;
  --jmx-border-color: #ddd4c8;
  --jmx-color-success: #336b3f;
  --jmx-color-error: #9a2432;
  --jmx-container: 1200px;
  --jmx-content: 760px;
  --jmx-radius-small: 3px;
  --jmx-radius-medium: 6px;
  --jmx-spacing-xs: 0.5rem;
  --jmx-spacing-sm: 1rem;
  --jmx-spacing-md: 2rem;
  --jmx-spacing-lg: 4rem;
  --jmx-spacing-xl: 7rem;
  --jmx-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --jmx-font-heading: Georgia, "Times New Roman", serif;
  --jmx-shadow-soft: 0 8px 28px rgb(0 0 0 / 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--jmx-color-text);
  background: var(--jmx-color-background);
  font-family: var(--jmx-font-body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

figure {
  margin-inline: 0;
}

a {
  color: var(--jmx-color-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--jmx-color-accent-dark);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--jmx-color-accent) 55%, white);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block: 0 0.65em;
  color: var(--jmx-color-text);
  font-family: var(--jmx-font-heading);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
}

p,
ul,
ol,
blockquote,
table {
  margin-block: 0 1.5rem;
}

blockquote {
  margin-inline: 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--jmx-color-accent);
  color: var(--jmx-color-muted);
}

hr {
  border: 0;
  border-block-start: 1px solid var(--jmx-border-color);
  margin-block: var(--jmx-spacing-md);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border: 1px solid var(--jmx-border-color);
  text-align: start;
}

label {
  display: inline-block;
  margin-block-end: 0.35rem;
  font-weight: 600;
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  color: var(--jmx-color-text);
  background: var(--jmx-color-background);
  border: 1px solid #aaa;
  border-radius: var(--jmx-radius-small);
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

button,
input[type="button"],
input[type="submit"],
.jmx-button,
.wp-block-button__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--jmx-radius-small);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.jmx-button--primary,
.wp-block-button__link,
button,
input[type="button"],
input[type="submit"] {
  color: #fff;
  background: var(--jmx-color-primary);
}

.jmx-button--primary:hover,
.wp-block-button__link:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  color: #fff;
  background: var(--jmx-color-accent);
}

.jmx-button--secondary {
  color: var(--jmx-color-text);
  background: var(--jmx-color-surface);
  border-color: var(--jmx-border-color);
}

.jmx-button--outline,
.is-style-outline > .wp-block-button__link {
  color: var(--jmx-color-text);
  background: transparent;
  border-color: currentColor;
}

.jmx-button--outline:hover,
.is-style-outline > .wp-block-button__link:hover {
  color: #fff;
  background: var(--jmx-color-primary);
  border-color: var(--jmx-color-primary);
}

.jmx-container {
  width: min(calc(100% - 64px), var(--jmx-container));
  margin-inline: auto;
}

.jmx-narrow {
  max-width: var(--jmx-content);
}

.jmx-site-main {
  min-height: 45vh;
  padding-block: clamp(2.5rem, 6vw, var(--jmx-spacing-xl));
}

.jmx-front-page {
  padding-block: 0;
}

.jmx-front-page-content > .jmx-entry-content > :where(:not(.alignfull):not(.alignwide)) {
  width: min(calc(100% - 64px), var(--jmx-container));
  margin-inline: auto;
}

.jmx-front-page-content > .jmx-entry-content > .alignwide {
  width: min(calc(100% - 64px), var(--jmx-container));
  margin-inline: auto;
}

.jmx-front-page-content > .jmx-entry-content > .alignfull {
  width: 100%;
  max-width: none;
}

.jmx-entry-content > :first-child,
.jmx-entry > :first-child {
  margin-block-start: 0;
}

.jmx-entry-content > :last-child,
.jmx-entry > :last-child {
  margin-block-end: 0;
}

.jmx-entry-title a {
  color: inherit;
  text-decoration: none;
}

.jmx-entry-meta,
.jmx-archive-description {
  color: var(--jmx-color-muted);
  font-size: 0.925rem;
}

.jmx-entry-thumbnail {
  display: block;
  margin-block-end: 1.5rem;
  overflow: hidden;
  border-radius: var(--jmx-radius-medium);
}

.jmx-entry-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.jmx-post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}

.jmx-page-header {
  margin-block-end: var(--jmx-spacing-lg);
}

.navigation.pagination,
.post-navigation {
  margin-block-start: var(--jmx-spacing-lg);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.page-numbers {
  display: inline-grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0.4rem;
  border: 1px solid var(--jmx-border-color);
  text-decoration: none;
}

.page-numbers.current {
  color: #fff;
  background: var(--jmx-color-primary);
  border-color: var(--jmx-color-primary);
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form label {
  flex: 1;
  margin: 0;
}

.search-submit {
  flex: 0 0 auto;
}

.jmx-error-page,
.jmx-no-results {
  text-align: center;
}

.jmx-error-page .search-form,
.jmx-no-results .search-form {
  max-width: 36rem;
  margin: 2rem auto;
}

.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 {
  position: fixed !important;
  z-index: 100000;
  inset: 1rem auto auto 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto !important;
  color: #fff;
  background: var(--jmx-color-accent);
  border-radius: var(--jmx-radius-small);
}

.wp-caption,
.wp-block-image {
  max-width: 100%;
}

.wp-caption-text,
.wp-element-caption {
  color: var(--jmx-color-muted);
  font-size: 0.875rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

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