/* ============================================
   MOC UNIFIED EDITORIAL DESIGN
   ============================================ */

/* FOUNDATION: Single continuous surface */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #3a4a36;
  background-color: #f8f8f7;
}

html {
  background-color: #f8f8f7;
}

.site {
  background-color: #f8f8f7;
  display: flex;
  justify-content: center;
}

.site.grid-container {
  background-color: #f8f8f7;
}

/* Remove nested white boxes */
main,
.site-main,
article {
  background-color: transparent;
}

/* CENTERING - Content width & margins */
.site-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* Article/post styling */
article {
  padding: 0;
  margin: 0;
  width: 100%;
}

.post-content {
  padding: 0;
  margin: 0;
}

/* NAVIGATION & HEADER */
.nav-primary a {
  border-left: none;
}

#secondary {
  border-left: none;
}

/* Remove right accent line */
main::after {
  display: none;
}

/* TYPOGRAPHY HIERARCHY */
h1 {
  font-size: 2rem;
  color: #3a4a36;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  color: #3a4a36;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

h3 {
  font-size: 1.1rem;
  color: #5a6a56;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

h4, h5, h6 {
  color: #5a6a56;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: #3a4a36;
}

/* LISTS */
ul, ol {
  margin-bottom: 1rem;
  margin-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* EXPANDABLE SECTIONS */
details {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 2rem 0;
}

details summary {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: #3a4a36;
  user-select: none;
}

details summary:hover {
  color: #5a6a56;
}

details summary::marker {
  color: #9bb9a0;
}

details[open] {
  display: block;
}

details > *:not(summary) {
  margin-left: 0;
  padding-left: 0;
}

/* TABLES */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

table thead {
  background-color: transparent;
}

table th {
  background-color: transparent;
  border-bottom: 2px solid #e8e8e6;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #3a4a36;
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e8e8e6;
  color: #3a4a36;
}

table tbody tr:hover {
  background-color: rgba(155, 185, 160, 0.05);
}

/* MOBILE TABLE RESPONSIVENESS */
@media (max-width: 768px) {
  .site-content {
    padding: 1rem;
  }
  
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  table thead,
  table tbody,
  table tr,
  table td,
  table th {
    display: block;
  }
  
  table thead {
    display: none;
  }
  
  table tr {
    margin-bottom: 1rem;
    border: 1px solid #e8e8e6;
    padding: 0.5rem;
    background-color: rgba(248, 248, 247, 0.5);
  }
  
  table td {
    padding: 0.5rem 0;
    text-align: right;
    border: none;
  }
  
  table td::before {
    content: attr(data-label);
    float: left;
    font-weight: 600;
    color: #5a6a56;
  }
}

/* BUTTONS & LINKS */
a {
  color: #5a6a56;
  text-decoration: none;
}

a:hover {
  color: #9bb9a0;
}

button, .button {
  background-color: #9bb9a0;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

button:hover, .button:hover {
  background-color: #7a9980;
}

/* LOGO */
.custom-logo {
  max-height: 3.5rem;
  width: auto;
}

/* HEADER */
.site-header {
  background-color: #f8f8f7;
}

/* FOOTER */
.site-footer {
  background-color: #9bb9a0;
  color: white;
  padding: 2rem 1rem;
}

footer.site-footer {
  background-color: #9bb9a0;
}

.site-footer a {
  color: white;
}

.site-footer a:hover {
  color: #f8f8f7;
}

/* HIDE ELEMENTS removed — replaced by override below */

/* SPACING & MARGINS */
.entry-header {
  margin-bottom: 2rem;
}

.entry-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e6;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 1024px) {
  .site-content {
    max-width: 800px;
  }
}

@media (max-width: 768px) {
  .site-content {
    max-width: 100%;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
  }
}

/* BLOCKQUOTES */
blockquote {
  border-left: 4px solid #9bb9a0;
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  color: #5a6a56;
  font-style: italic;
}

/* CODE */
code {
  background-color: rgba(155, 185, 160, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: "Monaco", "Courier New", monospace;
  color: #3a4a36;
}

pre {
  background-color: rgba(155, 185, 160, 0.1);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* UTILITY CLASSES */
.text-muted {
  color: #9bb9a0;
}

.text-emphasis {
  color: #5a6a56;
  font-weight: 600;
}

/* ===========================================================
   MOC EDITORIAL OVERRIDES — 2026-05-08
   Bundled fixes: tables, accordion spacing + arrow on right,
   footer box-in-box, search box, newsletter spacing, last-reviewed.
   These rules use stronger selectors + !important to win the
   cascade over earlier theme/global rules.
   =========================================================== */

/* ----- Footer: remove inner box (issue #5) ----- */
footer.site-info,
.site-footer footer.site-info { background: transparent !important; }

/* ----- Tables: clean editorial styling (issue #3) ----- */
.entry-content .moc-table table,
.entry-content .wp-block-table table,
.entry-content table {
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
  border: 1px solid #dfe4dc !important;
  margin: 16px 0 20px !important;
  display: table !important;
  white-space: normal !important;
}
.entry-content .moc-table,
.entry-content .wp-block-table {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 20px !important;
  background: transparent !important;
  border: 0 !important;
}
.entry-content table th,
.entry-content table thead th {
  background: #edf3ea !important;
  color: #546053 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 12px 14px !important;
  text-align: left !important;
  border: 1px solid #e3e8e1 !important;
  border-bottom: 2px solid #9eb39c !important;
  display: table-cell !important;
  vertical-align: top;
}
.entry-content table thead { background: transparent !important; display: table-header-group !important; }
.entry-content table tbody { display: table-row-group !important; }
.entry-content table tr {
  display: table-row !important;
  margin: 0 !important; padding: 0 !important;
  border: none !important; background: transparent !important;
}
.entry-content table td {
  padding: 12px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  background: #ffffff !important;
  color: #546053 !important;
  border: 1px solid #e3e8e1 !important;
  text-align: left !important;
  display: table-cell !important;
  vertical-align: top;
  word-break: break-word;
}
.entry-content table td::before { content: none !important; }
.entry-content table tbody tr:nth-child(2n) td { background: #fafcf8 !important; }
.entry-content table tbody tr:hover td { background: #f1f5ee !important; }
/* ----- Details/accordions: spacing + arrow on right (issues #4, #6) ----- */
details.moc-details,
.wp-block-details.moc-details {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}
details.moc-details summary,
.wp-block-details.moc-details summary {
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  border-bottom: 1px solid #ecebe5 !important;
  background: transparent !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #546053 !important;
  cursor: pointer !important;
}
details.moc-details summary::-webkit-details-marker,
.wp-block-details.moc-details summary::-webkit-details-marker {
  display: none !important;
}
details.moc-details summary::marker,
.wp-block-details.moc-details summary::marker {
  content: '' !important;
  display: none !important;
  color: transparent !important;
}
details.moc-details summary::after,
.wp-block-details.moc-details summary::after {
  content: '+' !important;
  margin-left: auto !important;
  font-size: 24px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  color: #798b77 !important;
  transition: transform .2s ease;
}
details.moc-details[open] > summary::after,
.wp-block-details.moc-details[open] > summary::after {
  content: '\2212' !important; /* en dash for "minus" */
}
details.moc-details > :not(summary),
.wp-block-details.moc-details > :not(summary) {
  margin: 0 !important;
  padding: 14px 0 22px !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: #3a4a36 !important;
}

/* ----- Search box: aesthetic refresh (issue #7a) ----- */
.wp-block-search .wp-block-search__input {
  background-color: #f4f3ee !important;
  border: 1px solid #cfd6c9 !important;
  border-radius: 12px !important;
  padding: 14px 18px 14px 46px !important;
  font-size: 16px !important;
  color: #3a4a36 !important;
  height: auto !important;
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  display: block !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23798b77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: 16px center !important;
  box-shadow: 0 1px 2px rgba(58, 74, 54, 0.04) !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
}
.wp-block-search .wp-block-search__input::placeholder {
  color: #8c958a !important;
  font-style: normal !important;
}
.wp-block-search .wp-block-search__input:focus {
  border-color: #9eb39c !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(158, 179, 156, 0.22) !important;
}
.wp-block-search .wp-block-search__inside-wrapper { border: none !important; }

/* ----- Newsletter spacing (issue #8) ----- */
.ml-block-form .ml-form-embedSubmit,
.ml-form-embedBody .ml-form-embedSubmit {
  margin-top: 14px !important;
  margin-bottom: 24px !important;
}
.ml-block-form .ml-form-formContent { margin-bottom: 0 !important; }

/* End MOC editorial overrides */


/* ===========================================================
   POLISH PASS — spacing, alignment, mobile tables, alignfull cap
   =========================================================== */



/* ===========================================================
   CONTENT WIDTH · SIDE MARGINS · BREATHING ROOM (canonical)
   Single source of truth for the content container width and
   side padding. Uses the same 3-class selectors that previously
   created a 980/1000 split, so this rule wins on every body class
   variant (home, full-width-content, one-container, archives, CPT
   singles, custom templates) — no more inconsistency.
   =========================================================== */
body {
  letter-spacing: 0.01em !important;
  line-height: 1.7 !important;
}
.entry-content p,
.entry-content li,
.entry-content td,
.entry-content th {
  letter-spacing: 0.01em !important;
  line-height: 1.7 !important;
}
body .site-content,
body.full-width-content .site-content,
body.one-container .site-content,
body.full-width-content.one-container .site-content,
body.home .site-content,
body.page-template-default .site-content,
body.archive .site-content,
body.single .site-content,
body.post-template .site-content {
  max-width: 1000px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body .site-content .inside-article,
body.full-width-content .site-content .inside-article,
body.one-container .site-content .inside-article,
body.full-width-content.one-container .site-content .inside-article {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
@media (max-width: 768px) {
  body .site-content,
  body.full-width-content .site-content,
  body.one-container .site-content,
  body.full-width-content.one-container .site-content {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}
@media (max-width: 480px) {
  body .site-content,
  body.full-width-content .site-content,
  body.one-container .site-content,
  body.full-width-content.one-container .site-content {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}
/* End canonical content-width block */

/* (3) Nested accordions inside flex wp-block-group containers — stretch full width so '+' lines up at far right */
.entry-content .wp-block-group.is-layout-flex {
  flex-direction: column !important;
  align-items: stretch !important;
}
.entry-content .wp-block-group.is-layout-flex > details.moc-details,
.entry-content .wp-block-group.is-layout-flex > .wp-block-details.moc-details,
.entry-content .wp-block-group.is-layout-flex > .wp-block-details {
  flex: 1 1 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}


/* (5) Cap alignfull / alignwide blocks — prevent breakout outside .site-content */
.entry-content .alignfull,
.entry-content .alignwide,
.entry-content > .wp-block-group.alignfull,
.entry-content > .wp-block-group.alignwide,
.entry-content .wp-block-group.alignfull,
.entry-content .wp-block-group.alignwide {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}
.entry-content .alignfull > .wp-block-group__inner-container,
.entry-content .alignwide > .wp-block-group__inner-container {
  max-width: 100% !important;
}
/* End polish pass */


/* ===========================================================
   MOBILE TABLE SCROLL FIX (revised)
   Earlier rule set display:block + width:100% on the table itself,
   which prevented the figure wrapper from ever scrolling. Wide tables
   (Insulin: 7 cols) ended up squished. Correct: wrapper scrolls,
   table extends to its natural max-content width, table-layout:auto
   overrides has-fixed-layout, inner cells keep table-* display.
   =========================================================== */
@media (max-width: 768px) {
  .entry-content .moc-table,
  .entry-content .wp-block-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
  }
  .entry-content .moc-table table,
  .entry-content .wp-block-table table,
  .entry-content table,
  .entry-content table.has-fixed-layout,
  .entry-content .wp-block-table .has-fixed-layout {
    display: table !important;
    table-layout: auto !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
  }
  .entry-content table thead { display: table-header-group !important; }
  .entry-content table tbody { display: table-row-group !important; }
  .entry-content table tr    { display: table-row !important; }
  .entry-content table th,
  .entry-content table td {
    display: table-cell !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere;
  }
  .entry-content table.has-fixed-layout td,
  .entry-content table.has-fixed-layout th { min-width: 110px; }
}
/* End mobile table scroll fix */

/* PWA install banner color fix (plugin omits #) */
#pwaforwp-add-to-home-click { background-color: #3D4F3B !important; }

/* P0 fix: restore visually-hidden helper so search label stops causing
   horizontal overflow on the homepage. Audit 2026-05-28 §3.1. */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
/* P1.3 — hide orphaned site logo on inner pages.
   Homepage hero wordmark stays; footer wordmark and breadcrumb 'home'
   link carry the brand on inner pages. Audit 2026-05-28 §3.2. */
body:not(.home) .site-logo {
    display: none !important;
}