:root {
  --coral: #ff674d;
  --plum: #4a4063;
  --cream: #ffeedb;
  --red: #c83e4d;
  --lavender: #ada8b6;
  --ink: #2f2a36;
  --paper: #fff8ef;
  --max-width: 760px;
  --wide-width: 1060px;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(74, 64, 99, 0.10);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

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

.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,
.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  top: 1rem;
  left: 1rem;
  z-index: 10000;
  padding: .7rem 1rem;
  background: var(--paper);
  color: var(--plum);
}

.container,
.entry-content {
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin-inline: auto;
}

.wide-container {
  width: min(var(--wide-width), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: .85rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 238, 219, .95);
  border-bottom: 1px solid rgba(74, 64, 99, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  width: min(var(--wide-width), calc(100% - 1rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-title {
  color: var(--plum);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  margin-left: auto;
}

.site-nav .menu,
.site-nav > div > ul {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--plum);
  font-family: "Inter", Arial, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .025em;
  text-decoration: none;
  text-transform: lowercase;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  color: var(--coral);
  border-bottom-color: currentColor;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  padding: .5rem .1rem;
  background: transparent;
  color: var(--plum);
  font: 700 .84rem "Inter", Arial, sans-serif;
  text-transform: lowercase;
  cursor: pointer;
}

.hero {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 5.5rem 0 4rem;
  text-align: center;
}

.classroom-hero {
  min-height: 66vh;
}

.hero-inner {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--red);
  font-family: "Inter", Arial, sans-serif;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--plum);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.14;
  letter-spacing: -.025em;
}

h1 {
  max-width: 860px;
  margin: 0 auto 1.4rem;
  font-size: clamp(2.55rem, 7vw, 5.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

.hero-deck {
  max-width: 720px;
  margin: 0 auto;
  color: var(--plum);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
}

.hero-deck > *:first-child {
  margin-top: 0;
}

.hero-deck > *:last-child {
  margin-bottom: 0;
}

.page-hero {
  padding: 6.5rem 0 2.75rem;
}

.page-hero h1 {
  margin-inline: 0;
  max-width: 900px;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

.page-copy {
  padding-bottom: 5rem;
}

.section {
  padding: clamp(3.25rem, 7vw, 5.5rem) 0;
  border-top: 1px solid rgba(74, 64, 99, .22);
}

.section-title {
  margin: 0;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.button,
.wp-block-button__link,
input[type="submit"] {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: .78rem 1.3rem;
  border: 2px solid var(--coral);
  border-radius: 999px;
  background: var(--coral);
  color: #251d24;
  font-family: "Inter", Arial, sans-serif;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.button:hover,
.button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
  transform: translateY(-1px);
  border-color: var(--red);
  background: var(--red);
  color: white;
}

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

.button-secondary:hover,
.button-secondary:focus-visible,
.is-style-outline > .wp-block-button__link:hover,
.is-style-outline > .wp-block-button__link:focus-visible {
  background: var(--plum);
  border-color: var(--plum);
  color: white;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
  margin-top: 1.25rem;
}

.text-link {
  color: var(--plum);
  font-family: "Inter", Arial, sans-serif;
  font-size: .88rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.post-card,
.empty-state {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border: 1px solid rgba(74, 64, 99, .18);
  border-radius: var(--radius);
  background: rgba(255, 248, 239, .67);
  box-shadow: 0 14px 35px rgba(74, 64, 99, .07);
}

.post-card-meta {
  margin-bottom: .55rem;
  color: var(--red);
  font-family: "Inter", Arial, sans-serif;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.post-card-title {
  margin: 0 0 .8rem;
  font-size: clamp(1.45rem, 2.7vw, 2rem);
}

.post-card-title a {
  text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus-visible {
  color: var(--red);
}

.post-card-excerpt {
  margin-bottom: 1rem;
}

.post-card-excerpt > *:first-child {
  margin-top: 0;
}

.post-card .text-link {
  margin-top: auto;
}

.entry-content {
  padding-bottom: 4.5rem;
}

.entry-content > * {
  max-width: 100%;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2.2em;
}

.entry-content a {
  color: var(--red);
  text-underline-offset: 3px;
}

.entry-content blockquote,
.wp-block-quote {
  margin: 2rem 0;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--coral);
  background: rgba(255, 248, 239, .66);
  color: var(--plum);
  font-size: 1.1em;
}

.entry-content .wp-block-file,
.entry-content .wp-block-group.is-style-card {
  margin-block: 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(74, 64, 99, .18);
  border-radius: var(--radius);
  background: rgba(255, 248, 239, .67);
}

.entry-meta {
  color: #665f70;
  font-size: .92rem;
  font-style: italic;
}

.entry-footer {
  padding-bottom: 4rem;
}

.post-navigation {
  border-top: 1px solid rgba(74, 64, 99, .22);
  padding-top: 2rem;
}

.nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.nav-next {
  text-align: right;
}

.comments-area {
  padding: 2rem 0 5rem;
  border-top: 1px solid rgba(74, 64, 99, .22);
}

.comment-list {
  padding-left: 1.4rem;
}

.comment-body {
  margin-bottom: 1.25rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: rgba(255, 248, 239, .65);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid rgba(74, 64, 99, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .56);
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(255, 103, 77, .22);
  outline-offset: 1px;
  border-color: var(--plum);
}

.search-form {
  display: flex;
  gap: .7rem;
  max-width: 620px;
  margin: 1.5rem auto 2.5rem;
}

.search-form label {
  flex: 1;
}

.motto {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.8rem;
  align-items: center;
  column-gap: .55rem;
  width: min(100%, 720px);
  min-height: 3.9rem;
  margin: 0 auto 1.2rem;
  color: var(--red);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.motto [data-motto] {
  min-width: 0;
}

.motto-refresh {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--lavender);
  cursor: pointer;
  font: 500 1.18rem/1 "Inter", Arial, sans-serif;
  transition: color .18s ease, background-color .18s ease, transform .35s ease;
}

.motto-refresh:hover,
.motto-refresh:focus-visible {
  background: rgba(74, 64, 99, .08);
  color: var(--plum);
  transform: rotate(150deg);
}

.site-footer {
  border-top: 1px solid rgba(74, 64, 99, .22);
  padding: 2.5rem 0 3rem;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.footer-nav .menu,
.footer-nav > div > ul {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--plum);
  font-family: "Inter", Arial, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.motto-footer {
  width: min(100%, 500px);
  min-height: 3rem;
  margin: 0;
  color: var(--plum);
  font-size: clamp(1rem, 2vw, 1.2rem);
  text-align: right;
}

.pagination,
.posts-navigation {
  margin-top: 2rem;
}

.page-numbers {
  display: inline-flex;
  min-width: 2.2rem;
  min-height: 2.2rem;
  align-items: center;
  justify-content: center;
  margin: .2rem;
  border-radius: 999px;
  color: var(--plum);
  font-family: "Inter", Arial, sans-serif;
  text-decoration: none;
}

.page-numbers.current {
  background: var(--plum);
  color: white;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .header-inner {
    width: calc(100% - .25rem);
  }

  .site-title {
    max-width: 72%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: .75rem;
    left: .75rem;
    display: none;
    margin-left: 0;
    padding: .55rem 1rem .85rem;
    border: 1px solid rgba(74, 64, 99, .18);
    border-radius: 0 0 14px 14px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav .menu,
  .site-nav > div > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .site-nav li,
  .site-nav a {
    width: 100%;
  }

  .site-nav a {
    display: block;
    padding: .72rem 0;
  }

  .hero {
    min-height: 60vh;
    padding: 4.5rem 0 3.25rem;
  }

  .page-hero {
    padding-top: 4.75rem;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .motto-footer {
    text-align: left;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  .nav-next {
    text-align: left;
  }

  .search-form {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .container,
  .entry-content,
  .wide-container {
    width: min(100% - 1.35rem, var(--max-width));
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.4rem);
  }

  .section {
    padding-block: 3rem;
  }

  .motto {
    min-height: 5rem;
    column-gap: .35rem;
  }
}

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


/* ======================================================
   V1.1: WIDER READING AREA + SERIF HEADINGS + PAGE OUTLINE
   ====================================================== */

:root {
  --reading-width: 880px;
  --outline-width: 230px;
  --reading-gap: clamp(2rem, 4vw, 4rem);
}

.reading-shell {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--outline-width) minmax(0, var(--reading-width));
  gap: var(--reading-gap);
  justify-content: center;
  align-items: start;
}

.reading-main {
  width: 100%;
  max-width: var(--reading-width);
  margin-inline: 0;
}

.single-entry .page-hero,
.page-entry .page-hero {
  padding: 5.25rem 0 2.25rem;
}

.single-entry .page-hero h1,
.page-entry .page-hero h1 {
  max-width: var(--reading-width);
  margin-inline: 0;
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: clamp(2.6rem, 5.2vw, 4.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.02em;
}

.entry-content {
  width: 100%;
  padding-bottom: 4rem;
  font-size: 1.02rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-weight: 600;
  letter-spacing: -.015em;
}

.entry-content h2 {
  margin-top: 1.7em;
  margin-bottom: .55em;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.08;
}

.entry-content h3 {
  margin-top: 1.55em;
  margin-bottom: .45em;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.12;
}

.entry-content h4 {
  margin-top: 1.4em;
  margin-bottom: .4em;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.page-outline {
  position: sticky;
  top: 6.5rem;
  padding: 1.1rem 1rem 1.15rem;
  border: 1px solid rgba(74, 64, 99, .18);
  border-radius: var(--radius);
  background: rgba(255, 248, 239, .68);
  box-shadow: 0 12px 30px rgba(74, 64, 99, .06);
}

.page-outline[hidden] {
  display: none;
}

.outline-title {
  margin: 0 0 .65rem;
  color: var(--red);
  font-family: "Inter", Arial, sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.outline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.outline-item {
  margin: 0;
}

.outline-item a {
  display: block;
  padding: .36rem 0;
  color: var(--plum);
  font-family: "Inter", Arial, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.outline-item a:hover,
.outline-item a:focus-visible {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.outline-item-sub a {
  padding-left: .8rem;
  color: #665f70;
  font-size: .77rem;
  font-weight: 600;
}

.entry-content h2,
.entry-content h3 {
  scroll-margin-top: 6rem;
}

.entry-footer.reading-main {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 980px) {
  .reading-shell {
    width: min(var(--reading-width), calc(100% - 2.5rem));
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .page-outline {
    position: static;
    order: 0;
  }

  .entry-content {
    order: 1;
  }

  .outline-list {
    columns: 2;
    column-gap: 1.5rem;
  }

  .outline-item {
    break-inside: avoid;
  }
}

@media (max-width: 600px) {
  .reading-shell {
    width: min(100% - 1.35rem, var(--reading-width));
  }

  .single-entry .page-hero,
  .page-entry .page-hero {
    padding-top: 4rem;
  }

  .single-entry .page-hero h1,
  .page-entry .page-hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.5rem);
  }

  .outline-list {
    columns: 1;
  }

  .page-outline {
    padding: 1rem;
  }
}


/* ======================================================
   V1.2: TITLE ALIGNMENT + SMALLER ARTICLE HEADINGS
   ====================================================== */

/* The page title belongs over the article column, not the outline column. */
.single-entry .page-hero .reading-main,
.page-entry .page-hero .reading-main {
  grid-column: 2;
}

/* Quieter page and post titles. */
.single-entry .page-hero h1,
.page-entry .page-hero h1 {
  font-size: clamp(2.35rem, 4.2vw, 3.8rem);
  line-height: 1.04;
}

/* Quieter headings inside long pages and posts. */
.entry-content h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.55rem);
  line-height: 1.1;
}

.entry-content h3 {
  font-size: clamp(1.4rem, 2.15vw, 1.9rem);
  line-height: 1.14;
}

.entry-content h4 {
  font-size: clamp(1.18rem, 1.7vw, 1.48rem);
}

@media (max-width: 980px) {
  .single-entry .page-hero .reading-main,
  .page-entry .page-hero .reading-main {
    grid-column: 1;
  }
}

@media (max-width: 600px) {
  .single-entry .page-hero h1,
  .page-entry .page-hero h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }

  .entry-content h2 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .entry-content h3 {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }
}


/* ======================================================
   V1.3: CUSTOMIZER-CONTROLLED DESIGN
   ====================================================== */

:root {
  --yowm-heading-font: "EB Garamond", Garamond, Georgia, serif;
  --yowm-h1-size: 3rem;
  --yowm-h2-size: 2.3rem;
  --yowm-h3-size: 1.75rem;
  --yowm-h4-size: 1.4rem;
  --yowm-hero-space: 84px;
  --yowm-section-space: 72px;
  --yowm-outline-display: block;
  --yowm-outline-position: sticky;
}

.single-entry .page-hero,
.page-entry .page-hero {
  padding-top: var(--yowm-hero-space);
}

.section {
  padding-top: var(--yowm-section-space);
  padding-bottom: var(--yowm-section-space);
}

.single-entry .page-hero h1,
.page-entry .page-hero h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: var(--yowm-heading-font);
}

.single-entry .page-hero h1,
.page-entry .page-hero h1 {
  font-size: var(--yowm-h1-size);
}

.entry-content h2 {
  font-size: var(--yowm-h2-size);
}

.entry-content h3 {
  font-size: var(--yowm-h3-size);
}

.entry-content h4 {
  font-size: var(--yowm-h4-size);
}

.page-outline {
  display: var(--yowm-outline-display);
  position: var(--yowm-outline-position);
}

@media (max-width: 980px) {
  .page-outline {
    position: static;
  }
}
