.site-content{
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background-color: var( --bg-base );
}
.site-content.home-content{
	background-color: var( --bg-base );
}
.home-grid{
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, var( --page-width ) ) minmax( 0, 1fr );
	margin: 0 auto;
	justify-content: center;
	container-type: inline-size;
	container-name: home-grid;
}
.home-grid-content{
	grid-column: 2;
	margin: 0 auto;
	background-color: var( --bg-page );
	width: 100%;
	padding: 4vh 4vw;
}
MAIN{
	padding: 0 0 4vh 0;
	flex-grow: 1;
}

.main-titles{
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, var( --page-width ) ) minmax( 0, 1fr );
	margin: 0 auto;
	font-size: clamp( 0.85rem, 1vw + 0.5rem, 1rem );
	position: relative;
	padding: 0 0 0 0;
}

.main-titles-content{
	grid-column: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 100%;
	max-width: var( --page-width );
	margin: 0 auto;
	padding: 3rem 0 0 0;
	color: var( --text-dark );
	background-color: var( --bg-page );
}

.main-titles-content::before{
	content: '';
	background-image: url( '/st-george-favicon.svg' );
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	width: 64px;
	aspect-ratio: 1/1;
}
.main-titles .main-titles-text{
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem 1rem 2rem 1rem;
	row-gap: 1rem;
	position: relative;
}

.main-titles .titles{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.main-titles .supertitle{
	display: block;
	font-family: var( --font-sans );
	font-size: 1em;
	font-weight: 700;
	opacity: 0.7;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	max-width: 360px;
	text-align: center;
	margin: 1rem 0 0 0;
	color: var( --text-dark );
}

.main-titles .main-title{
	display: flex;
	flex-direction: column;
	align-items: center;
}
.main-titles .main-title .title{
	font-size: 1.2em;
	font-style: normal;
	font-family: var( --font-display );
	font-weight: 400;
	margin: 0 0 0 0;
	text-transform: none;
	letter-spacing: 0em;
	text-align: center;
	opacity: 1;
	line-height: 1.2;
}
.home-content .main-titles .main-title .title{
	font-size: 2em;
	color: var( --heading-dark );
}
.main-titles .subtitle{
	display: block;
	font-family: var( --font-sans );
	color: var( --text-dark );
	font-size: 1.4em;
	font-weight: 500;
	opacity: 0.7;
	font-style: normal;
	max-width: 360px;
	text-align: center;
	margin: 0 0 0 0;
}
.home-content .main-titles .subtitle{
	font-size: 1.4em;
	font-weight: 500;
}
.main-titles .slogan{
	display: block;
	font-family: var( --font-sans );
	color: var( --text-dark );
	font-size: 1.1em;
	font-weight: 500;
	opacity: 0.7;
	font-style: normal;
	max-width: 360px;
	text-align: center;
	text-wrap: balance;
	margin: 0 0 0 0;
}
.main-titles .description{
	max-width: 400px;
	margin: 1rem auto 0 auto;
	text-align: justify;
	text-justify: inter-word;
	font-size: 1em;
	font-style: italic;
	hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
}
.main-titles .description STRONG{
	font-weight: 500;
}
.main-titles .fleuron{
	width: 200px;
	margin: 1rem 0;
}

.home-quotation{
	grid-column: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 0 8rem 0;
	width: 100%;
	background-color: var( --bg-page );
	margin: 0 0 2rem 0;
}
.home-quotation FIGURE{
	margin: 0;
	padding: 0;
}
.home-quotation .quote-card{
	/* Restricts max width to 480px, while leaving a 1.5rem (24px) margin on small screens */
	width: min(calc(100% - 2rem), 640px);
	margin-inline: auto;
	padding: 3rem 2rem 1rem 2rem;
	text-align: center;
	position: relative;
	font-family: var( --font-serif );
	color: var( --text-dark );
	font-style: italic;
}

/* Quote Paragraph */
.quote-text {
	position: relative;
	font-size: clamp( 1.2rem, 1.6vw + 0.5rem, 1.6rem );
	line-height: 1.4;
	color: var( --text-dark );
	text-wrap: balance;
	margin: 0 0 0 0;
}
.home-quotation FIGCAPTION{
	font-family: var( --font-sans );
	color: var( --text-dark );
	font-size: clamp( 0.8rem, 1vw + 0.5rem, 1rem );
	opacity: 0.7;
	font-weight: 700;
	text-align: center;
}
.home-slogan{
	grid-column: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 6rem auto 4rem auto;
}
.home-slogan P{
	width: min(calc(100% - 3rem), 480px);
	margin-inline: auto;
	margin: 0 3rem 1rem 3rem;
	text-align: center;
	position: relative;
	font-family: var( --font-serif );
	color: var( --text-dark );
	font-style: italic;
	font-size: clamp( 1rem, 1.4vw + 0.5rem, 1.4rem );
	text-wrap: balance;
}

.tns{
	width: 100%;
	max-width: 560px;
	margin: 6rem auto 4rem auto;
	font-size: clamp( 0.95rem, 1.1vw + 0.5rem, 1.1rem );
}

.tns > .titles{
	margin: 0 0 4rem 0;
}

.tns > .titles .title{
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0 0 2rem 0;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.3em;
	font-size: 1em;
	row-gap: 2rem;
}

.tns > .titles .title::after{
	content: '';
	height: 3px;
	width: 240px;
	background-color: var( --exercise-category-border );
}

.tns > .titles .subtitle{
	font-size: 0.8em;
	margin: 0 auto 3rem auto;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	text-align: center;
	max-width: 240px;
	text-wrap: balance;
}

.tns .content P{
	font-size: 0.9em;
	margin: 1em auto 1em auto;
	text-align: justify;
	text-justify: inter-word;
	hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
}

.tns .content P.disclaimer{
	font-size: 0.7em;
}

.tns .content P A{
	font-weight: 500;
    background-color: var( --link-bg ); 
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var( --link-underline );
}

.tns .content .styled-list,
.tns .content .inline-list{
	font-size: 0.95em;
}

.tns .content .hints{
	font-style: italic;
	font-size: 0.9em;
}

.tns .content .hints::before{
	content: '[';
}

.tns .content .hints::after{
	content: ']';
}

.tns .content STRONG{
	font-weight: 600;
	color: var( --text-accent );
	font-style: italic;
	font-size: 0.95em;
}

.tns BLOCKQUOTE{
	display: flex;
	flex-direction: column;
	overflow: visible;
	width: auto;
	margin-top: 1.25rem;
	margin-bottom: 1.25rem;
	margin-right: 0;
	margin-left: 0; /* Reset blockquote margin */
	padding: 0 0 0 2rem;
}

.tns BLOCKQUOTE P{
	position: relative;
	margin: 0 0 0 0;
	padding: 0 0.75rem;
	border-left: 3px solid var( --link-dark );
	font-style: italic;
	font-weight: 500;
}
.tns BLOCKQUOTE P.source {
  	margin: 0 0 0 0;
	border-left: none;
}

.gloss-anchor{
	display: flex;
	justify-content: flex-start;
	align-items: center;
	column-gap: 0.5em;
	background: none;
	border: none;
	font-size: 0.85em;
	font-weight: 600;
	font-family: var( --font-sans );
	cursor: pointer;
}
.gloss-anchor::before{
	display: grid;
	place-items: center;
	border-radius: 50%;
	background-color: var( --link-dark );
	color: #FFF;
	font-weight: 700;
	content: '?';
	font-size: 0.7em;
	width: 2em;
	aspect-ratio: 1 / 1;
}

.gloss-popover .popover-content{
	font-size: 1rem;
}

.gloss-popover .popover-content P{
	margin: 0.75em 0;
	text-align: justify;
	text-justify: inter-word;
	hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
}

.gloss-popover .popover-content STRONG{
	font-weight: 600;
	color: var( --text-accent );
	font-style: italic;
	font-size: 0.95em;
}

.gloss-popover .popover-content BLOCKQUOTE{
	display: flex;
	flex-direction: column;
	overflow: visible;
	width: auto;
	margin-top: 1.25rem;
	margin-bottom: 1.25rem;
	margin-right: 0;
	margin-left: 0;
	padding: 0 0 0 2rem;
}

.gloss-popover .popover-content BLOCKQUOTE P{
	text-indent: 0;
	position: relative;
	margin: 0 0 0 0;
	padding-left: 1rem;
	border-left: 3px solid var( --link-dark );
	font-style: italic;
	font-weight: 500;
	margin: 0 !important;
}
.gloss-popover .popover-content BLOCKQUOTE p:last-child {
	margin-bottom: 0;
}

.gloss-popover .popover-content BLOCKQUOTE::before{
	display: none;
}

.gloss-popover DL{
	display: flex;
	flex-direction: column;
}
.gloss-popover DT{ 
	font-family: var( --font-display ); 
	font-size: 2em;
	font-weight: 400;
	margin-top: 2rem;
}
.gloss-popover DT:first-child{
	margin-top: 0;
}
.gloss-popover DD{}

/* Container & Base List Reset */
.pagination-nav {
  margin: 2.5rem 0;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Button & Counter Styling */
.pagination-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2b2b2b;
  background-color: #fdfdfd;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  
  /* Touch target sizes for mobile accessibility */
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.75rem;
  
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Hover & Focus States */
.pagination-btn:hover:not(.active):not([disabled]) {
  background-color: var( --hero-bg-light );
  border-color: #999;
}

.pagination-btn:focus-visible {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}

/* Active Page State */
.pagination-btn.active {
  background-color: var( --link-dark );
  color: var( --link-light );
  border-color: var( --link-dark );
  cursor: default;
  font-weight: 600;
}

/* Disabled State (e.g. Prev button on Page 1) */
.pagination-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #e0e0e0;
}

/* Ellipsis & Summary styling */
.pagination-ellipsis,
.pagination-summary {
  font-size: 0.95rem;
  color: var( --text-dark );
  font-weight: 600;
  padding: 0 0.25rem;
}

.pagination-btn .btn-image IMG{
	width: 0.8em;
	height: auto;
}

/* Responsive Rules */

/* Mobile view (< 600px): Hide individual page numbers, show Prev / Next + Page Counter */
@media (max-width: 599px) {
  .desktop-only {
    display: none;
  }
  
  .pagination {
    width: 100%;
    justify-content: space-between;
  }

  .pagination-summary {
    font-weight: 500;
  }
}

/* Desktop view (>= 600px): Show full page range, hide summary text */
@media (min-width: 600px) {
  .pagination-summary {
    display: none;
  }
}

.error-page{
	grid-column: 2;
	background-color: var( --bg-page );
	width: 100%;
}
.error-page-content{
	color: var( --text-dark );
	margin: 2rem auto 6rem auto;
	max-width: 640px;
	display: flex;
	flex-direction: column;
	row-gap: 1rem;

}
.error-page .title{
	font-size: 1.2rem;
	font-weight: 700;
}