/* --- THE WHITE MARGIN FIX --- */

/* 1. Turn the Right Sidebar background white */




#quarto-margin-sidebar {
    background-color: #ffffff !important;
    border-left: none !important; /* Removes the vertical line if it exists */
    padding-left: 20px !important;
}

/* 2. Ensure the main content area is also white to match */
#quarto-content {
    background-color: #ffffff !important;
}

/* --- THE VERTICAL RULE ERASER --- */

/* Targets the Right Sidebar specifically */

div#quarto-margin-sidebar.sidebar.margin-sidebar {
  border-right: none !important;
  border-left: none !important;
  overflow: hidden;
}

#quarto-margin-sidebar.sidebar {
  border-right: none !important;
  border-left: none !important;
}

/* Targets the main content container's right edge */
#quarto-content.page-columns main {
    border-right: none !important;
}

.column-margin,
aside,
.aside {
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
}

.column-margin img,
aside img,
.aside img {
  max-width: 100% !important;
  height: auto !important;
}

div#quarto-margin-sidebar.sidebar.margin-sidebar {
  border-right: none !important;
  border-left: none !important;
}

/* Targets the main content container's right edge */
#quarto-content.page-columns main {
    border-right: none !important;
}

.sidebar.margin-sidebar {
  border-right: none !important;
  border-left: none !important;
}

.column-margin,
aside,
.aside {
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
}

.column-margin img,
aside img,
.aside img {
  max-width: 100% !important;
  height: auto !important;
}
  `

.sidebar.margin-sidebar {
  border-right: none !important;
  border-left: none !important;
}

/* Removes the 'Aside' separator lines */
div.column-margin, 
aside, 
.aside {
    border-left: none !important;
    border-right: none !important;
}

div.column-margin figcaption,
aside figcaption,
.aside figcaption {
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 100 !important;
  color: #250707 !important;
  font-style: italic !important;
}



/* Sometimes Quarto uses a pseudo-element (::before/::after) for the line */
#quarto-margin-sidebar::before, 
#quarto-margin-sidebar::after {
    display: none !important;
}

/* --- THE ICONIC NAVBAR (Final Polish) --- */
.navbar-brand {
  display: flex !important;
  align-items: center;
  padding-left: 10px; /* Moves the 'o' away from the very edge */
}

.navbar-brand img {
  content: url('favicon1.png') !important;
  height: 52px !important; /* Increased from 42px to make it less 'shy' */
  width: auto;
  filter: drop-shadow(0 0 6px rgba(6, 111, 184, 0.7)); /* Stronger brand glow */
  transition: transform 0.3s ease;
}

.navbar-brand img:hover {
  transform: scale(1.05); /* A subtle 'living' response to the mouse */
}

/* Ensure the duplicate text remains hidden */
.navbar-title {
  display: none !important;
}

.navbar-nav .nav-link {
  transition: color 0.2s ease-in-out;
  /* Ensure the weight is the same for both states */
  font-weight: 600 !important; 
}

/* 3. WHITE LINKS -> BLUE ON HOVER */
.navbar-nav .nav-link {
  color: #f2f2f2 !important; /* Clean white for the 'Milkman' look */
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-weight: 600 !important;
  transition: color 0.2s ease-in-out;
}

.img-block {
  display: table;
  width: 100%;
}

.img-block-caption {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 100;
  color: #250707;
  font-style: italic;
  border-top: 1px solid #e8e8e8;
  padding-top: 4px;
  margin-top: 2px;
  width: 100% !important;
  display: block !important;
  max-width: none !important;
}

.img-float-right {
  float: right !important;
  display: block !important;
  margin-left: 20px;
  margin-bottom: 10px;
  max-width: 40%;
}

.img-float-left {
  float: left !important;
  display: block !important;
  margin-right: 20px;
  margin-bottom: 10px;
  max-width: 40%;
}

.navbar-nav .nav-link:hover {
  color: #066fb8 !important; /* The blue reveal */
}

/* 3. WHITE LINKS -> BLUE ON HOVER */
.navbar-nav .nav-link {
  color: #f2f2f2 !important; /* Clean white for the 'Milkman' look */
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-weight: 600 !important;
  transition: color 0.2s ease-in-out;
}

/* --- 0. LOAD FONTS (Local Files) --- */
/* Note: The <link> tag for Typekit must go in _quarto.yml, not here! */

/* --- 0. LOAD FONTS (Local Files) --- */


/* Fira Sans Condensed - REGULAR */
@font-face {
    font-family: 'Fira Sans Condensed';
    src: url('fonts/FiraSansCondensed-Regular.ttf') format('truetype');
    font-weight: 400; /* Use 400 for standard Roman */
    font-style: normal;
}

/* Fira Sans Condensed - BOLD */
@font-face {
    font-family: 'Fira Sans Condensed';
    src: url('fonts/FiraSansCondensed-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Fira Sans Condensed - ITALIC */
@font-face {
    font-family: 'Fira Sans Condensed';
    src: url('fonts/FiraSansCondensed-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic; /* CRUCIAL: This tells the browser to use THIS file for italics */
}

/* Fira Sans Condensed - LIGHT ITALIC */
@font-face {
    font-family: 'Fira Sans Condensed';
    src: url('fonts/FiraSansCondensed-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}


/* Rosario (Headings - Sans) */
@font-face {
  font-family: 'Rosario-Light';
  src: url('fonts/Rosario-Light.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Rosario';
  src: url('fonts/Rosario-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'Rosario';
  src: url('fonts/Rosario-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
  
}

/* Cormorant (Backup Serif) */
@font-face {
  font-family: 'Cormorant';
  src: url('fonts/Cormorant-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Cormorant';
  src: url('fonts/Cormorant-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

/* Cormorant SC (Headings/Small Caps) */
@font-face {
  font-family: 'Cormorant SC';
  src: url('fonts/CormorantSC-Medium.ttf') format('truetype');
  font-weight: normal; /* Map file's bold to normal usage if needed */
  font-style: normal;
}

@font-face {
  font-family: 'Cormorant Upright';
  src: url('fonts/CormorantUpright-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Cormorant SC (Headings/Small Caps) */
@font-face {
  font-family: 'Cormorant SC';
  src: url('fonts/CormorantSC-SemiBold.ttf') format('truetype');
  font-weight: normal; /* Map file's bold to normal usage if needed */
  font-style: normal;
}


/* Adobe Caslon Pro (Primary Body) */
@font-face {
  font-family: 'Adobe Caslon Pro';
  src: url('fonts/ACaslonPro-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  /* Standard ligatures (fi, fl) are on, but decorative swashes are off */
  font-feature-settings: "liga" 1, "swsh" 0; 
  text-rendering: optimizeLegibility;
}
@font-face {
  font-family: 'Adobe Caslon Pro';
  src: url('fonts/ACaslonPro-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'Adobe Caslon Pro';
  src: url('fonts/ACaslonPro-Italic.otf') format('opentype');
  font-weight: normal;
  font-style: italic;
}

/* Plantin (Secondary Body) */
@font-face {
  font-family: 'Plantin MT Pro';
  src: url('fonts/PlantinMTProLight.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'SecretaryHand';
  src: url('fonts/SecretaryRegular.ttf') format('truetype');
}

.manuscript-hand {
  font-family: 'SecretaryHand', serif;
  font-size: 1.5rem; /* Secretary hand often needs to be slightly larger to be legible */
  line-height: 1.4;
  color: #2c2c2c;
}

/* --- 1. GLOBAL TYPOGRAPHY --- */



body {
  /* Prioritizes Adobe Caslon, falls back to Plantin, then Cormorant */
  font-family: "Adobe Caslon Pro", "Plantin MT Pro", "Cormorant", serif; 
  font-variant-ligatures: common-ligatures;
  font-size: 1.15rem;      
  font-variant-numeric: oldstyle-nums proportional-nums;
  color: #333333;
  line-height: 1.3;
}

/* Keep the body beautiful, but make tables functional */
table, .table, .dataframe {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Target the breadcrumb container specifically */
.quarto-secondary-nav .breadcrumb {
    font-size: 0.6rem !important; /* Significant reduction from 1.15rem */
    line-height: 1;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Shrink the individual items and the links inside them */
.breadcrumb-item, 
.breadcrumb-item a {
    font-size: 0.7rem !important;
    color: #888 !important; /* Fade them out slightly so they don't compete with the title */
}

/* Reduce the size of the 'chevron' or 'slash' separator */
.breadcrumb-item + .breadcrumb-item::before {
    font-size: 0.6rem !important;
    vertical-align: middle;
}

/* Update this globally */
em, i {
    font-style: italic;
    /* Removed the font-family line so it inherits from its parent container */
}



h1, h2, h3, h4, h5, h6 {
  font-family: "Cormorant SC", "Fira Sans Condensed", sans-serif;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: #2c3e50;
  margin-top: 1.0em;
}




.manuscript-hand {
  font-family: 'SecretaryHand', serif;
  font-size: 1.5rem; /* Secretary hand often needs to be slightly larger to be legible */
  line-height: 1.4;
  color: #2c2c2c;
}

.sanspar {
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-size: 14px;
    line-height: 1.50; /* Tight leading for that 'Manuscript' feel */
    margin-left: 1%;  /* Responsive inset */
    margin-right: 5%;
    color: #695454;
    display: block;
}


.verse {
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-size: 14px;
    line-height: 0.75; /* Tight leading for that 'Manuscript' feel */
    margin-left: 5%;  /* Responsive inset */
    margin-right: 5%;
    margin-top: 1.0em;
    margin-bottom: 1.5em;
    white-space: pre-line; /* CRUCIAL: Honors your line breaks in the code */
    color: #333333;
    border-left: 2px solid #eee;
    padding-left: 20px;
    white-space: pre-line !important;
    display: block;
}

.two-col-verse {
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-size: 13px;
    line-height: 0.75; /* Tight leading for that 'Manuscript' feel */
    margin-left: 2%;  /* Responsive inset */
    margin-right:2%;
    margin-top: 1.0em;
    margin-bottom: 1.5em;
    white-space: pre-line; /* CRUCIAL: Honors your line breaks in the code */
    color: #333333;
    border-left: 2px solid #eee;
    padding-left: 5px;
    white-space: pre-line !important;
    display: block;
}

.prose{
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-size: 14px;
    line-height: 1.5; /* Tight leading for that 'Manuscript' feel */
    margin-left: 5%;  /* Responsive inset */
    margin-right: 5%;
    margin-top: 1.0em;
    margin-bottom: 1.5em;
    white-space: pre-line; /* CRUCIAL: Honors your line breaks in the code */
    color: #333333;
    border-left: 2px solid #eee;
    padding-left: 20px;
    white-space: pre-line !important;
    display: block;
}

/* --- THE GILDED INSET (REFINED) --- */
.inset-aside {
    width: 260px;
    padding: 1.2rem;
    background-color: #fefaf0; /* Parchment cream */
    border-left: 4px solid #800000; /* Heavier Oxblood Line */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05); /* Very subtle depth */
    font-family: 'Fira Sans Condensed', sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #2a2a2a;
}


/* --- FLOATED IMAGES WITH CONSTRAINED CAPTIONS --- */
.img-float-right {
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  max-width: 40%;
}

.img-float-left {
  float: left;
  margin-right: 20px;
  margin-bottom: 10px;
  max-width: 40%;
}

.img-float-right img,
.img-float-left img {
  width: 100%;
  height: auto;
  display: block;
}

.img-float-right figcaption,
.img-float-left figcaption,
.img-float-right p.caption,
.img-float-left p.caption {
  font-family: 'Fira Sans Light Condensed', sans-serif;
  font-size: 0.78rem;
  color: #666;
  font-style: normal;
  font-weight: 100;
  text-align: left;
  margin-top: 4px;
  width: 100%;  /* constrained by parent, not the text column */
}

.img-float-right figcaption,
.img-float-left figcaption,
.img-float-right p.caption,
.img-float-left p.caption {
  border-bottom: 1px solid #eeeeee;
  padding-top: 3px;
}



/* --- THE INSIDE ASIDE (PULL-QUOTE) --- */
.inset-aside {
    width: 250px;
    padding: 15px;
    margin: 10px;
    background-color: #fdfaf3; /* A soft 'parchment' cream */
    border-left: 3px solid #800000; /* Our signature Oxblood */
    font-family: 'Fira Sans Condensed', sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1a1a1a;
    border-radius: 2px;
}

/* Positioning Classes */
.inset-right {
    float: right;
    margin-left: 25px;
    margin-bottom: 20px;
}

.inset-left {
    float: left;
    margin-right: 25px;
    margin-bottom: 20px;
}

/* Clearfix for the paragraph following an inset */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.manuscript-exhibit {
  margin: 3rem 0;
  max-width: 900px;
}

.hand-d-caption {
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 0.7rem;
  font-weight: 700;
  color: #066fb8 !important;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  display: block;
}

.hand-d-verse {
  font-family: 'SecretaryHand', serif !important;
  font-size: 2.9rem; 
  line-height: 1 !important; 
  color: #1a1a1a; /* Deep 'Iron Gall' black */
  
  background-image: url("images/paper_texture_13.jpg") !important;
  background-size: cover;
  background-position: center;
  
  margin: 2.5rem 0;
  padding: 50px 70px; /* Extra 'breathing room' for the paper edges */
  border-left: 5px solid var(--pfc-blue); 
  box-shadow: 2px 5px 15px rgba(0,0,0,0.15); /* Gives the paper some 'weight' */
  white-space: pre-wrap;
  display: block;
}
/* For line numbers or marginalia */
.line-num .listing-author {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.8rem;
  color: #066fb8;
  position: absolute;
  left: -40px;
}

/* ================================================
   PFC Evidence Tiles — snappy hover, not languorous
   ================================================ */
.pfc-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.pfc-card img.pfc-colour {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pfc-card img.pfc-sq {
  display: block;
  width: 100%;
  transition: opacity 0.5s ease;
}

.pfc-card:hover img.pfc-colour {
  opacity: 1;
}

.pfc-card:hover img.pfc-sq {
  opacity: 0;
}

/* 1. Corrected Letter Vault & Title Block Paragraph */
/* 1. Corrected Letter Vault & Title Block Paragraph */
.letter-content,
.letter-vault {
    font-family: "Adobe Caslon Pro", "Plantin MT Pro", serif;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-top: 50px;
    margin-bottom: 30px;
    margin-left: 10%; 
    margin-right: 10%;
    color: #1a1a1a;
} /* <--- THE SEAL */


.letter-content,
.letter-vault {
    font-family: "Adobe Caslon Pro", "Plantin MT Pro", serif;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-top: 50px;
    margin-bottom: 30px;
    margin-left: 10%; 
    margin-right: 10%;
    color: #1a1a1a;
} /* <--- THE SEAL */

/* Target the 'letter-vault' container */
.letter-vault {
    font-family: "Adobe Caslon Pro", serif;
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 60px 10% 40px 10%; /* Larger top margin, medium sides */
    color: #1a1a1a;
}

/* Hide Nelson's navigation links and HTTrack comments */
.letter-vault p:first-of-type, 
.letter-vault p:last-of-type,
.letter-vault a[href*="next"],
.letter-vault a[href*="lltinlet"] {
    display: none !important;
}

/* Formatting for the 'Serious Table Work' feel */
.letter-vault p {
    margin-bottom: 1.2em;
    text-align: justify;
}


/* Ensure Nelson's <P> tags inherit the Caslon Wavelength */
.letter-content p {
    margin-bottom: 1.2em;
}


/* --- THE TRIPLE-HEADER UNIFICATION (FORCE ALIGN) --- */

/* Target the Left Sidebar, the Right Categories, AND the TOC specifically */
#quarto-sidebar .sidebar-menu-container > ul > li:first-child::before, 
.quarto-listing-category-title, 
#quarto-toc-head,
.sidebar-margin-content nav[role="doc-toc"] h2,
#quarto-margin-sidebar nav[role="doc-toc"] h2 {
    display: block !important;
    font-family: 'Cormorant SC', serif !important;
    font-size: 1.1rem !important;
    text-transform: uppercase !important;
    color: #1a1a1a !important;
    border-bottom: 1.5px solid #800000 !important; /* Floating Oxblood */
    padding-bottom: 8px !important;
    padding-left: 10px !important;
    margin-top: 35px !important; /* The Master Alignment */
    margin-bottom: 20px !important;
    letter-spacing: 0.05em;
}

/* Force the TOC title to ignore internal Quarto padding/margins */
nav[role="doc-toc"] h2 {
    margin-left: 0 !important;
    padding-top: 0 !important;
}

/* --- THE TOC '10PX JUMP' ENFORCEMENT --- */
#quarto-margin-sidebar nav[role="doc-toc"] h2,
#quarto-toc-head {
    margin-left: 0 !important; /* Strips the Quarto default */
    padding-left: 10px !important; /* The Masterpiece Nudge */
    text-indent: 0 !important;
    display: block !important;
    border-bottom: 1.5px solid #800000 !important; /* The Floating Oxblood Line */
}

/* Also nudge the actual list items under 'On this page' to match the Left Sidebar */
#quarto-margin-sidebar nav[role="doc-toc"] ul {
    padding-left: 15px !important;
    border-left: none !important; /* Removes the default gray vertical line if you prefer */
}


.quarto-sidebar-tools-main,
#quarto-margin-sidebar {
  margin-top: 28px;  /* adjust to match the actual offset */
}

#TOC a {
  white-space: normal;
  word-wrap: break-word;
}

/* --- BREADCRUMB MASTERPIECE REFINEMENT --- */
.quarto-page-breadcrumbs .breadcrumb,
.quarto-page-breadcrumbs .breadcrumb-item,
.quarto-page-breadcrumbs .breadcrumb-item a {
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-size: 0.75rem !important;
    text-transform: none; /* Keeps it legible as a path */
    letter-spacing: 0.02em;
    color: #5a7d9a !important; /* The Steel Blue 'Oxfraud' Link color */
}

/* Ensure the 'active' breadcrumb (the current page) is slightly darker */
.quarto-page-breadcrumbs .breadcrumb-item.active,
.quarto-page-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    color: #1a1a1a !important;
    font-weight: 500;
}


/* 4. Individual Letter Stasis: Adobe Caslon Pro constraints */
.letter-vault {
    font-family: "Adobe Caslon Pro", "Plantin MT Pro",  serif;
    margin-top: 40px; /* Larger top margin as preferred */
    margin-bottom: 20px;
    line-height: 1.6;
}


/* 1. Restore the 'Garrison' for the Right Sidebar (TOC) */
.page-columns #quarto-margin-sidebar {
    display: block !important;
    width: 250px; /* Reserves space for the 'Binary' proof of the TOC */
}

/* 2. Constrain the Oxford 'Coalface' to prevent over-widening */
#quarto-content.page-columns .column-body {
    max-width: 850px; /* The 'Golden' width for readability */
    margin-left: auto;
    margin-right: auto;
}

/* 3. Ensure the Listing Grids don't 'Vandalize' the margin */
.quarto-listing-container {
    max-width: 100%;
    padding-right: 20px;
    overflow-x: hidden;
}


/* --- SIDE-BY-SIDE VERSE COMPARISON --- */
.comparison-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

.comparison-column {
    flex: 1;
    min-width: 0; /* Prevents column blowout */
}

.comparison-header {
    font-family: 'Cormorant SC', serif;
    font-size: 0.9rem;
    border-bottom: 1.4px solid #800000; /* Oxblood Header */
    margin-bottom: 1rem;
    padding-bottom: 5px;
    color: #1a1a1a;
}

.comparison-verse {
    font-family: "Fira Sans Condensed", serif;
    font-size: 0.75rem;
    line-height: .75;
    white-space: pre-wrap; /* Honors your line breaks without a table */
    color: #333;
}

/* Optional: Use this for the Hand D side if you want the 'Manuscript' look */
.comparison-verse.hand-d {
    font-family: 'SecretaryHand', serif;
    font-size: 1.4rem;
    line-height: 1.2;
}



/* --- COMPACT ACADEMIC LISTS --- */

/* 1. Tighten the space ABOVE the list */
ul, ol {
    margin-top: 0.5em !important; /* Half of the standard 1em */
    margin-bottom: 1em;
}

/* 2. Reduce the 'Leading' (Line-Height) within list items */
/* Standard is usually 1.5; a 26% reduction brings us to ~1.4 */
li {
    line-height: 1.15 !important; 
    margin-bottom: 0.25em; /* Shrinks the gap between the bullets themselves */
}

/* 3. Handle nested lists to ensure they don't compound the margin */
li > ul, li > ol {
    margin-top: 0.1em !important;
}

/* 4. Target the 'PFC' specific list items if they have paragraphs inside */
li p {
    margin-top: 0 !important;
    margin-bottom: 0.25em !important;
}

/* Target the first letter of a paragraph with the .drop-cap class */
.drop-cap::first-letter {
    float: left;
    initial-letter: 3; /* Spans 3 lines */
    -webkit-initial-letter: 3;
    font-weight: bold;
    color: #2c3e50;
    margin-right: 0.1rem;
    line-height: 1;
    
    /* The "Precision Nudge" */
    position: relative;
    top: -0.15em; /* Adjust this value to align the top-right serif */
    padding-top: 5px; /* Alternative way to push it against the top margin */
}

/* Clearfix for the paragraph to prevent layout overlap */
.drop-cap::after {
    content: "";
    display: table;
    clear: both;
}

/* For letters that need to sit even closer */
.drop-cap.tight::first-letter {
    margin-right: 0.2rem;
}

/* Ensure the right margin doesn't clip the letter if it's pushed up */
.drop-cap {
    overflow: visible;
}

/* The Lead-in Small Caps */
.lead-in {
    font-family: "Cormorant SC", serif;
    font-weight: 200; /* Using your SemiBold cut */
    color: #1a1a1a;
    font-size: 1.0em; /* Compensating for the small-cap "shinkage" */
    letter-spacing: 0.02em; /* Just a hint of air between those sharp serifs */
    font-style: normal;
    margin-right: 0.05em; /* Just a surgical nudge */
}

  
/* Precision Lettrine for Cormorant SC */
.lettrine::first-letter {
    float: left;
    font-family: "Cormorant SC", serif;
    initial-letter: 3;
    -webkit-initial-letter: 3;
    
    /* Standardizes the height across browsers */
    line-height: 0.8; 
    margin-right: 0.rem;
    
    /* The "LaTeX-style" nudge */
    position: relative;
    transform: translateY(-0.08em); /* Fine-tune this for the upper serif */
    
    /* Optional: Ensure the letter doesn't feel too 'light' next to Plantin */
    font-weight: 500; 
}

/* --- 2. UTILITY CLASSES --- */

/* The Unbridgeable Divider */
hr.pfc-divider {
    border: 0;
    border-top: 4px double #444; /* Two solid lines, dark grey */
    height: 4px;                  /* Occupies space */
    margin-bottom: 2rem;          /* Big gap below */
    opacity: 1;                   /* Force full visibility */
    width: 100%;                  /* Span the full width */
}

.sc {
  font-family: 'Cormorant SC', serif; 
  font-variant: small-caps; 
  /* FIXED: Removed '#' which breaks CSS, use proper CSS comments */
  /* text-transform: lowercase; */ 
  font-size: 1.05em; /* FIXED: removed space between number and 'em' */
  letter-spacing: 0.00em; 
}


/* Sidebars, Margins, Captions */
figcaption,
figcaption,
.img-block-caption,
.figure-caption,
.sanspar,
div.column-margin figcaption,
aside figcaption,
.aside figcaption {
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 100 !important;
  color: #250707 !important;
  font-style: light-italic !important;
  border-top: 1px solid #dddddd;
  padding-top: 4px;
  margin-top: 2px;
  width: 100% !important;
  display: block !important;
  max-width: none !important;
}



/* Figure Captions Bold Label */
.figure-caption strong {
    font-weight: 500;
    color: #222;
}

/* Remove top padding on captions inside image-reveal */
.image-reveal + div.figure-caption {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ---LAYOUT & NAVIGATION --- */

.sidebar {
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
}

.sidebar-title {
  font-family: "Fira Sans Condensed", sans-serif;
  font-weight: bold;
}

.quarto-title-meta {
  display: none; 
}



/* Ensure hovers sit on top of everything else */
.tippy-box, 
.popover, 
.tooltip {
  z-index: 9999 !important;
}

/* Specifically for Quarto's built-in citation/footnote hovers */
.quarto-secondary-nav, 
.quarto-sidebar {
  z-index: 10; /* Lower than the hover elements */
}

/* If the hover is being "clipped" by the container boundary */
.quarto-container {
  overflow: visible !important;
}


/* --- HIGH-PRIORITY SIDEBAR OVERRIDE --- */
body #quarto-sidebar .sidebar-item-text,
body #quarto-sidebar .sidebar-link,
body .quarto-listing-category .category {
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-size: 0.8rem !important;
    padding-left: 15px !important; /* Forced Nudge */
    display: block !important;
    white-space: normal !important;
}

/* Ensure the titles also follow suit */
body #quarto-sidebar .sidebar-title,
body .quarto-listing-category-title {
    font-family: 'Cormorant SC', serif !important;
    padding-left: 10px !important;
    border-bottom: 1px solid #800000 !important;
}

/* --- THE CATEGORY MARGIN NUDGE --- */
.quarto-listing-category-title {
    margin-right: 15px !important;
    text-align: left;
    border-left: 3px solid #5a7d9a; /* Match the Steel Blue link color */
    padding-left: 10px;
}

/* --- CATEGORY ITEM ALIGNMENT (FORCE SINGLE COLUMN) --- */
.quarto-listing-category .category {
    display: block !important; /* Forces each item to its own line */
    padding-left: 15px !important; /* The 0000 Sable nudge */
    margin-bottom: 8px; /* Breathing room between items */
    white-space: normal; /* Allows wrapping within the block */
    word-break: break-word;
    font-family: 'Fira Sans Condensed', sans-serif;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #5a7d9a !important;
    max-width: 100%; /* Ensures it doesn't bleed into the main content */
}

/* Add a subtle 'bullet' or indicator to the left if you want more definition */
.quarto-listing-category .category::before {
    content: "•";
    color: #800000; /* Oxblood accent */
    margin-right: 8px;
    font-size: 0.7rem;
}

/* Optional: Add a small hover 'glow' for the items */
.quarto-listing-category .category:hover {
    color: #800000 !important; /* Oxblood highlight */
    text-decoration: underline;
}

/* Image Flow Helpers */
.hero-top {
  margin-top: -3.5rem;
  margin-bottom: 2rem;
}

.flow-left {
  float: left;
  margin-right: 15px;
  margin-bottom: 10px;
  max-width: 40%;
}

.flow-right {
  float: right;
  margin-left: 15px;
  margin-bottom: 10px;
  max-width: 40%;
}

/* Make the figure respect the float and contain the caption */
figure.flow-left,
figure.flow-right {
  display: table;  /* key trick — makes the figure shrink to image width */
}

figure.flow-left figcaption,
figure.flow-right figcaption {
  display: table-caption;
  caption-side: bottom;  /* or top */
  font-size: 0.82rem;
  color: #555;
  font-style: italic;
  text-align: left;
  padding-top: 4px;
}


/* --- SCIENTIFICALLY SUBTLE LINKS --- */
a {
    /* A desaturated, 'Steel' blue: less 'vibrant' than standard web blue */
    color: #2d3d4a !important; 
    text-decoration: none;
    /* Soft transition makes the 'reveal' feel more natural */
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 1px solid rgba(90, 125, 154, 0.2); /* Very faint underline */
}

a:hover {
    color: #066fb8 !important; /* The 'PFC Blue' reveal on hover */
    text-decoration: none;
    border-bottom: 1px solid #066fb8;
    background-color: rgba(6, 111, 184, 0.05); /* Extremely subtle highlight */
}

/* Ensure citations in the 'Swan of Hedingham' follow this logic */
.citation a, .footnote-ref a {
    color: #888 !important; /* Even lighter for academic markers */
    font-size: 0.9em;
}

/* Styling the Modal to match your Plantin/Cormorant theme */
.modal-content {
    background-color: #fdfdfd; /* A slight paper-white */
    border: 1px solid #d1d1d1;
    border-radius: 0; /* Sharp corners for a more 'printed' feel */
}

.modal-title {
    letter-spacing: 0.05em;
    color: #1a1a1a;
}



/* The 'Trigger' text (the word you hover over) */
.hover-note {
  color: #2e3b61; /* A sophisticated deep deep blue */
  text-decoration: underline dotted;
  cursor: help;
}

/* The Popover Box itself */
.popover {
  border-radius: 0; /* Sharp corners like a printed page */
  border: 1px solid #d1d1d1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.popover-header {
  font-family: "Cormorant SC", serif;
  font-weight: 600;
  background-color: #f8f8f8;
  border-bottom: 1px solid #eee;
}

.popover-body {
  font-family: "Adobe Caslon Pro", serif;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* A Sanitary Aside that won't break the Grid */
.aside, .column-margin {
    font-family: "Fira Sans Condensed", sans-serif !important;
    font-size: 0.85rem;
    line-height: 1.3;
    color: #444;
    padding-left: 15px;
    border-left: 2px solid #800000; /* Your Oxblood 'Hand' */
}

/* Styling the link inside the aside */
.column-margin a {
    color: #800000;
    text-decoration: none;
    font-weight: 400;
}

.column-margin a:hover {
    text-decoration: underline;
}


/* Tight Encode Sans Table Style */
.tight-table table {
    font-family: "Fira Sans Condensed", sans-serif;
    font-size: 0.85rem;
    line-height: 1.2;
    border-collapse: collapse;
    margin-top: 1em;
    width: 100%;
    /* These MUST be inside the brackets */
    margin-left: 0 !important;
    margin-right: auto !important;
    text-align: left !important;
}

/* --- THE TIGHT-TABLE GARRISON --- */

/* 1. Target the Container, the Table, and the Bootstrap class */
.tight-table,
.tight-table table,
.tight-table .table {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    width: 100% !important;
    margin-bottom: 1em;
}

/* 2. The Headers (Oxford Theme) */
.tight-table th {
    cursor: pointer;
    background-color: #f8f9fa;
    border-bottom: 2px solid #800000;
    padding: 8px 4px;
    vertical-align: bottom; /* Keeps the '↕' aligned at the bottom */
    white-space: normal;    /* Allows the wrap */
    line-height: 1.1;       /* Tightens the wrapped text */
    min-width: 85px;        /* Forces a consistent 'Garrison' for dates */
  }

  .tight-table th span {
    display: block;         /* Forces the name and date/source to split */
    font-size: 0.75rem;     /* Slightly smaller for the source name */
    opacity: 0.8;
  }

/* 3. The Cells (The 'Wracke' Fix) */
.tight-table td {
    padding: 6px 8px !important;
    text-align: left !important;
    vertical-align: top !important;
    font-size: 0.85rem !important; 
    line-height: 1.2 !important;
}

/* 4. Muzzle internal paragraphs or spans */
.tight-table td p,
.tight-table td span {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    margin: 0 0 0.5em 0 !important;
}

/* 5. Visual Polish: Striping & Hover */
.tight-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.tight-table tr:hover {
    background-color: rgba(128, 0, 0, 0.05);
}

/* Kill the centering specifically inside Quarto Figure blocks */
#fig-monument-comparison, 
.quarto-figure-center, 
.quarto-figure {
    text-align: left !important;
}

.quarto-figure > figure {
    margin-left: 0 !important;
    align-items: flex-start !important;
}


/* Align Table Captions to the Left */
caption, .table-caption, .quarto-table-caption {
    text-align: left !important;
    font-family: "Fira Sans Condensed", sans-serif;
    font-size:.75rem;
    font-weight: 100;
    color: #666;
    margin-left: 0 !important;
}

/* Ensure the container doesn't center the caption */
.tight-table {
    text-align: left !important;
}


.sortable-table th { position: relative; }
.sortable-table th::after { content: " ↕"; font-size: 0.8em; opacity: 0.3; }
.sortable-table th.th-sort-asc::after { content: " ↑"; opacity: 1; }
.sortable-table th.th-sort-desc::after { content: " ↓"; opacity: 1; }



/* --- 4. NAVIGATION & TOC TYPOGRAPHY --- */

/* Target the Left Sidebar (Navigation) & Right Sidebar (Table of Contents) */
#quarto-sidebar .sidebar-item-text,   /* The actual links in the left menu */
#quarto-sidebar .sidebar-title,       /* The section headers in the left menu */
#quarto-margin-sidebar .nav-link,     /* The links in the Right TOC */
nav[role="doc-toc"] {                 /* The TOC container */
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-size: 0.85em;                 /* Matches your other sidebars */
    letter-spacing: 0.00em;
}

/* Optional: Target the Top Navigation Bar links too if you want them condensed */
.navbar-nav .nav-link {
    font-family: 'Fira Sans Condensed', sans-serif !important;
    font-weight: 700; /* Make them slightly bolder for readability on the image */
}


/* --- Adjust Gallery Spacing --- */
/* This targets the grid container inside Quarto layout panels */
.quarto-layout-panel .quarto-layout-row {
    /* Change 1em to whatever you like. e.g., 5px for tight, 2em for wide. */
    gap: 0.25em !important; 
}


/* Force 3-column layout on wide screens */
@media (min-width: 768px) {
  .article-snapshots {
    display: grid !important;
    font-family: "Fira Sans Condensed", sans-serif;
    font-size: 0.75rem !important; /* Unified font size */
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 20px !important;
  }
}

/* Stack vertically only on very narrow screens (Z Fold front) */
@media (max-width: 767px) {
  .article-snapshots {
    display: block !important;
  }
  .snapshot-card {
    margin-bottom: 30px;
  }
}

.snapshot-card img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Keeps all images uniform in the 'Gallery' */
    filter: grayscale(100%);
}


/*Image reveal by swapping b&w for colour*/


.image-reveal {
  position: relative;
  display: inline-block;
}

.image-reveal .bw {
  display: block;
}

.image-reveal .colour {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 2s ease;
}

.image-reveal:hover .colour {
  opacity: 1;
}

.image-reveal {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.image-reveal img {
  max-width: 100%;
  height: auto;
}






/* Make the Hypothesis triggers match the site's professional tone */
.hypothesis-trigger {
    background-color: rgba(0, 0, 0, 0.05) !important; /* Almost transparent */
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.hypothesis-trigger:hover {
    background-color: #000 !important; /* Goes black on hover to match your nav bar */
    color: #fff !important;
}


.snapshot-card {
    padding: 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.snapshot-card:hover {
    background: #fcfcfc;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.snapshot-card h4 {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    color: #000;
}

.snapshot-card img {
    border-radius: 2px;
    margin-bottom: 10px;
    filter: grayscale(100%); /* Keeps the B&W Masterpiece aesthetic */
    transition: filter 0.5s ease;
}

.snapshot-card:hover img {
    filter: grayscale(0%); /* Brings them to life on hover */
}

/* Nudge Hypothesis out of the way on the Fold */
@media (max-width: 600px) {
    .hypothesis-trigger {
        transform: scale(0.8); /* Make the icons slightly smaller */
        right: 0 !important;   /* Hug the edge of the screen */
    }
}

/* The Wax Seal Button */
.wax-seal-btn {
    display: inline-block;
    margin-top: 5px;
    padding: 10px 20px 10px 45px;
    position: relative;
    font-family: 'Fira Sans Condensed', sans-serif;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 0.75rem !important; /* Unified font size */
    transition: color 0.3s ease;
}

.wax-seal-btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #8b0000;
    border-radius: 50%;
    box-shadow: 
        inset -2px -2px 4px rgba(0,0,0,0.4),
        inset 2px 2px 4px rgba(255,255,255,0.2),
        2px 2px 5px rgba(0,0,0,0.2);
    border: 1px solid #700000;
}

.wax-seal-btn:hover::before {
    background: #a00000;
    transform: translateY(-50%) scale(1.05);
}

/* The Container: Only the first one gets the 'Endline' */
.pscript {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1.4px solid #800000; /* One single Oxblood line */
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* The Content: This forces the size and font on every paragraph inside */
.pscript p, 
.pscript span,
.pscript li {
    font-family: "Adobe Caslon Pro", serif !important;
    font-size: 0.85rem !important; /* Forces the smaller size */
    line-height: 1.3;
    color: #444;
    border-top: none !important; /* Kills the extra lines between notes */
    margin-bottom: 0.5em;
    text-align: left;
}

/* Target the Footnote numbers and text */
.footnote-ref, 
.footnote-back,
.footnotes {
  font-size: 0.85em; /* Approximately 2 points smaller than body text */
  line-height: 1.3;
}

/* Target the Bibliography/References section */
#refs, 
.references {
  font-size: 0.85em;
  line-height: 1.4;
}


/* 1. Target the overall Vancouver/Elsevier container */
.references, 
.csl-bib-body {
  font-size: 0.85em !important;
  line-height: 1.4;
  margin-top: 1.5em;
}

/* 2. Target the [1], [2] numbering specifically */
.csl-left-margin {
  font-size: 0.85em !important;
  padding-right: 0.5em;
  color: #666; /* Slight grey to keep the 'Wavelength' professional */
}

/* 3. Target the citation text body */
.csl-right-inline {
  font-size: 0.85em !important;
  margin-bottom: 0.4em;
  display: block; /* Ensures the 'Serious Table Work' stays aligned */
}
/* The Hand D 'Lens' Effect */
.lens-container {
  overflow: hidden; /* Contains the zoom */
  border: 1px solid #333;
  background-color: hsl(30, 44%, 90%);
  cursor: crosshair;
}

.lens-container img {
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), 
              filter 0.6s ease;
  transform-origin: center; /* Zooms into the middle of the frame */
}

/* The 'Loupe' Activation */
.lens-container:hover img {
  transform: scale(1.8); /* Stronger zoom for high-res details */
  filter: contrast(1.3) brightness(1.1) saturate(0.8);
}

/* Optional: Caption styling for the 'Plate' */
.lens-caption {
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  margin-top: 10px;
  letter-spacing: 1px;
}

/* The Gallery 'Light Table' - Resources & Evidence */
.evidence-gallery .card-img-top {
  overflow: hidden;
}

.evidence-gallery .card:hover img {
  transform: scale(1.1);
  filter: contrast(1.2);
}

.evidence-gallery .card:hover::after {
  content: "INSPECT";
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(170, 0, 0, 0.8); /* Our OxFraud Red */
  color: #1a1a1a;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.6rem;
  padding: 2px 6px;
  letter-spacing: 1px;
}

/* --- SUPPRESS CATEGORIES ABOVE ARTICLES --- */
.quarto-title-meta-category, 
.quarto-categories {
    display: none !important;
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
}

/* --- THE DEFINITIVE 'SECTIONS' HEADER --- */
#quarto-sidebar .sidebar-menu-container > ul > li:first-child::before {
    content: "SECTIONS";
    display: block !important;
    font-family: 'Cormorant SC', serif !important;
    font-size: 1.1rem !important;
    color: #1a1a1a !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 10px !important; /* The Signature Nudge */
    border-bottom: 1px solid #800000 !important; /* Oxblood Mirror Line */
    padding-bottom: 8px;
    margin-bottom: 20px;
    margin-top: 10px;
}

