/* =========================
   1. Brand Colour Variables & Reset
   ========================= */
:root {
  --brand-primary: #c58b39;   /* Gold */
  --brand-secondary: #5a4632; /* Deep Brown */
  --brand-accent: #006600;    /* Green */
  --brand-light: #f8f4ec;     /* Beige */
  --brand-dark: #333333;      /* Charcoal */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  overflow-y: scroll;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--brand-dark);
  background-color: #fff;
  padding: 0 0.75rem;
}

hr {
  border: none;
  border-top: 4px dotted var(--brand-accent);
  margin: 0.2rem 0;
}

/* =========================
   2. Layout Containers
   ========================= */
.site-main {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  body { padding: 0 1rem; }
  .site-main { 
    max-width: 900px; 
    padding: 0 1rem; 
  }
  .text-page .site-main { max-width: 800px; }
}

@media (min-width: 1400px) {
  .site-main { max-width: 1024px; }
}

/* =========================
   3. Typography & Links
   ========================= */
a {
  color: var(--brand-accent);
  text-decoration: none;
}

a:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
}

/* =========================
   4. Unified Button & Tag System
   ========================= */

/* Base button/tag styling - used for all clickable elements */
.btn, .tag, .site-nav a {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 0.1rem 0.15rem 0;
}

/* Navigation buttons (header menu) */
.site-nav a {
  color: white;
  background-color: var(--brand-secondary);
}

.site-nav a:hover {
  background-color: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(2px) scale(1.03);
}

.site-nav a.btn-main {
  background-color: var(--brand-accent);
}

.site-nav a.btn-main:hover {
  background-color: #004d00;
}

/* Article tags */
.tag {
  background: var(--brand-primary);
  color: var(--brand-light);
  font-size: 0.75rem;
  padding: 0.1rem 0.3rem;
  margin: 0.25rem 0.25rem 0 0;
}

.tag:hover {
  background: var(--brand-secondary);
  color: #fff;
  text-decoration: none;
}

/*intro to tag collections */
.tag-intro {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0em 0 2em;
  max-width: 900px;
}

.tag-intro-image {
  max-width: 150px;
  height: auto;
  border-radius: 8px;
}
/* On narrow screens, stack vertically */
@media (max-width: 600px) {
  .tag-intro {
 
    align-items: left; /* centres the image above text */
    text-align: left;  /* optional: centre the text too */
  }

  .tag-intro-image {
    max-width: 90px; /* let it scale nicely on mobile */
    margin-bottom: 0.0rem;
  }
}
/*random or latest combined flex with search box */

/* Header row: heading + search */
.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem; /* Changed from 0rem */
  margin-bottom: 0.5rem; /* Add some space below */
}

.article-heading-line {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Changed from 0rem */
  font-size: 1.25rem;
  font-weight: bold;
  flex: 1 1 auto;
}

/* Search container */
.search-container {
  flex: 0 0 300px;
  max-width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
}

/* Unified search input styling - remove the conflicting .search-box input rule */
#search-input {
  flex: 1;
  padding: 2px 6px;
  border: 3px solid #336633;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

#search-input:focus {
  outline: none;
  border: 3px solid #4CAF50;
}

.search-box button {
  margin-left: 0.25rem;
}

/* Mobile: stack, search above heading */
@media (max-width: 600px) {
  .articles-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .search-container {
    order: -1;
    flex: 1 1 100%;
    max-width: 100%;
  }
  
  #search-input {
    font-size: 1.1rem;
  }
}

/* Toggle buttons */
.article-switch {
  display: inline-flex;
}

.article-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #ccc;
  background: #fff;
  color: #393;
  padding: 0.2rem 0.5rem;
  border-radius: 7px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.article-btn:last-child {
  margin-right: 0; /* Remove margin from last button */
}

.article-btn:first-child { border-radius: 6px 0 0 6px; }
.article-btn:last-child  { border-radius: 0 6px 6px 0; }

.article-btn:hover {
  background: #eee; /* Remove var() */
}

.article-btn.active {
  background: #006600; /* Remove var() */
  color: #fff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Keep your search results styling */
#clear-search {
  background: #f44336;
}
#clear-search:hover {
  background: #da190b;
}
#search-results-title {
  color: #333;
  margin-bottom: 1rem;
}
.search-highlight {
  background-color: #ffeb3b;
  font-weight: bold;
}
.no-results {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2rem;
}

/* Action buttons (back, submit, etc.) */
.back-button, .contact-form button {
  background-color: var(--brand-secondary);
  color: #fff;
  font-size: 1rem;
  padding: 0.2em 0.8em;
  box-shadow: 0 4px 8px rgba(139, 69, 19, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.back-button:hover, .contact-form button:hover {
  background-color: #a0522d;
  text-decoration: none;
  transform: translateY(2px);
}

/* Responsive adjustments */
@media (min-width: 480px) {
  .site-nav a {
    margin: 0 0.15rem 0.15rem 0;
    padding: 0.05rem 0.5rem;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .tag {
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
  }
}

/* =========================
   5. Header & Footer
   ========================= */
.site-header {
  border-bottom: 2px solid var(--brand-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.site-header img {
  height: auto;
  max-width: 100%;
}

.site-nav {
  margin-top: 0.2rem;
}

.site-footer {
  border-top: 2px solid var(--brand-primary);
  padding-top: 0.5rem;
  margin-top: 1rem;
  text-align: center;
}

/* =========================
   6. Article Listings
   ========================= */
.pinned-icon {
  float: right;
  margin-left: 1rem;
  width: 40px;
  height: auto;
  vertical-align: middle;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.5rem;
  max-width: 900px;
}

.article-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-text {
  flex: 1;
  line-height: 1.3;
}

/* Responsive display toggles */
.mobile-only { display: block !important; }
.desktop-only { display: none !important; }

@media (min-width: 768px) {
  .articles-list { gap: 1.5rem; }
  .article-row { 
    flex-direction: row; 
    gap: 1rem; 
  }
  .mobile-only { display: none !important; }
  .desktop-only { display: block !important; }
  .desktop-only.article-thumb-container {
    flex: 0 0 150px;
    padding-top: 10px;
  }
}

/* Mobile meta row layout */
.article-meta-row {
  display: flex !important;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0.5rem 0;
}

@media (min-width: 768px) {
  .article-meta-row { display: none !important; }
}

.mobile-only .article-thumb-container {
  flex: 0 0 40% !important;
  max-width: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-meta-container {
  flex: 1 !important;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  min-width: 0;
}

/* =========================
   7. Article Typography
   ========================= */

/* Thumbnails */
.article-thumb, .mobile-only .article-thumb-container .article-thumb {
  max-width: 100%;
  height: auto;
  max-height: 150px;
  display: block;
  border-radius: 4px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

@media (min-width: 768px) {
  .article-thumb {
    max-width: 150px;
    max-height: none;
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.75), 0 2px 6px rgba(0, 0, 0, 0.7);
  }
}

.article-thumb:hover {
  transform: translateX(1px) translateY(1px);
  box-shadow: 0 5px 15px rgba(139, 69, 19, 0.75), 0 1px 5px rgba(0, 0, 0, 0.7);
}

/* Titles */
.article-title {
  color: var(--brand-accent);
 
  font-size: 1.1rem;
}

.article-bigq {
  color: var(--brand-accent);
  font-size: 1.5rem;
}

.articles-list .article-title { font-size: 1.2rem; }
.article-page .article-title { font-size: 1.5rem; }

@media (min-width: 600px) {
  .article-title { font-size: 1.3rem; }
  .articles-list .article-title { font-size: 1.4rem; }
  .article-page .article-title { font-size: 1.8rem; }
}

/* Meta information */
.article-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin: -0.25rem 0 0.5rem;
}

.article-meta {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .article-subtitle { font-size: 0.95rem; }
  .article-meta {
    font-size: 0.8rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
}

.article-date, .article-reading-time, .reading-time {
  color: var(--brand-secondary);
  font-style: italic;
  white-space: nowrap;
}

.reading-time { text-align: right; }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.article-tags strong {
  color: var(--brand-secondary);
}

/* =========================
   8. Single Article Layout
   ========================= */
.article-hero {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--brand-secondary) 20%, white),
    #fff
  );
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 20px;
}

.article-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.article-image {
  order: -1;
  max-width: 100%;
}

.article-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 150px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.8), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.article-body {
  flex: 1;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .article-hero {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    /* Make hero sticky on desktop 
    position: sticky;*/
    top: 0.5rem;
    z-index: 10;
  }
  
  .article-content {
    flex-direction: row;
    gap: 1.5rem;
  }
  
  .article-image {
    flex: 0 0 340px;
    max-width: 340px;
    order: 0;
    /* Make hero image sticky on desktop */
    position: sticky;
    top: calc(0.5rem + var(--hero-height, 280px) + 0.5rem);
    z-index: 5;
    align-self: flex-start;
  }
  
  .article-image img {
    width: 300px;
    max-height: none;
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.95), 0 2px 6px rgba(0, 0, 0, 1);
  }
}

/* =========================
   9. Article Body Content
   ========================= */
.article-body > * + * {
  margin-top: 1.25em; /* space between paragraphs */
}

/* Drop cap - desktop only */
@media (min-width: 768px) {
  .article-body > p:first-of-type::first-letter {
    float: left;
    font-size: 3.2em;
    line-height: 0.9;
    font-weight: bold;
    margin-right: 0.15em;
    margin-top: 0.05em;
    padding: 0.05em 0.15em;
    background-color: #f4f4f4;
    border-radius: 4px;
    color: #222;
    font-family: Georgia, serif;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
}

.article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 {
  margin-top: 1em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.article-body ul, .article-body ol {
  padding-left: 1.2rem;
  line-height: 1.5;
}

.article-body blockquote {
  font-style: italic;
  border-left: 4px solid #ccc;
  padding-left: 1em;
  color: #555;
  margin-left: 0;
  margin-right: 0;
}

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

.article-body > p:first-of-type {
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .article-body ul, .article-body ol { padding-left: 1.5em; }
  .article-body img { max-width: 200px; }
  .article-body > p:first-of-type { font-size: 1.2em; }
}

.new-tab-icon {
  opacity: 0;
  font-size: 0.8em;          /* smaller */
  position: relative;
  top: -0.2em;                /* nudge upwards */
  margin-left: 0.0em;
  color: darkgreen;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-decoration: none;  /* no underline */
}

a:hover .new-tab-icon,
a:focus .new-tab-icon {       /* also show on keyboard focus */
  opacity: 1;
  transform: scale(1);
}



/* =========================
   10. Article Footer & Related
   ========================= */
.article-footer, .related-articles {
  padding: 1rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #666;
  border-radius: 15px;
  text-align: center;
}

.article-footer {
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--brand-secondary) 20%, white),
    #fff
  );
}

.related-articles {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--brand-secondary) 20%, white),
    #fff
  );
  text-align: left;
  margin-top: 0.5rem;
}

.article-back {
  margin-top: 2em;
  text-align: center;
}

@media (min-width: 768px) {
  .article-footer, .related-articles {
    padding: 0.75rem;
    border-radius: 20px;
  }
  
  .related-articles {
    margin-top: 3em;
    padding-top: 1.5em;
    padding-left: 1.5em;
  }
}

.related-articles h2 {
  font-size: 1.2em;
  margin-bottom: 0.75em;
}

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles li + li {
  margin-top: 0.5em;
}

.related-articles ul a {
  text-decoration: none;
  color: #8b4513;
}

.related-articles ul a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .related-articles h2 { font-size: 1.4em; }
}
/* =========================
   11. Pagination & Tag Cloud
   ========================= */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.pagination a {
  color: var(--brand-accent);
  font-weight: bold;
  padding: 0.5rem;
  text-align: center;
}

.pagination a:hover {
  color: var(--brand-secondary);
}

.all-tags {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.all-tags li {
  background: var(--brand-light);
  border-radius: 3px;
}

.all-tags a {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
  color: var(--brand-secondary);
  font-size: 0.8rem;
}

.all-tags a:hover {
  background: var(--brand-primary);
  color: #fff;
}

.tag-count {
  color: #666;
  font-size: 0.7rem;
}

@media (min-width: 768px) {
  .all-tags { gap: 0.5rem; }
  .all-tags a { 
    padding: 0.3rem 0.6rem; 
    font-size: 0.85rem; 
  }
  .tag-count { font-size: 0.75rem; }
}

/* =========================
   12. Special Pages
   ========================= */
.about-hero, .contact-hero {
  padding: 1.5rem 1rem;
  text-align: center;
}

.about-hero {
  background-color: var(--brand-light);
  border-bottom: 2px solid var(--brand-primary);
}

.contact-hero {
  background-color: var(--brand-primary);
  color: var(--brand-light);
}

.about-title {
  margin: 0;
  font-size: 1.8rem;
  color: var(--brand-secondary);
}

.about-subtitle, .contact-hero .tagline {
  margin-top: 0.5rem;
  font-size: 1rem;
  opacity: 0.9;
}

.about-subtitle { color: var(--brand-dark); }

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  align-items: start;
}

.about-image img {
  display: block;
  max-width: 250px;
  margin: 0 auto;
  border: 6px solid var(--brand-accent);
  border-radius: 12px;
}

.about-text {
  font-size: 1rem;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .about-hero, .contact-hero { padding: 2rem 1rem; }
  .about-title { font-size: 2.2rem; }
  .about-subtitle, .contact-hero .tagline { font-size: 1.2rem; }
  
  .about-content {
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem 1rem;
  }
  
  .about-image img {
    max-width: 300px;
    margin: 0;
    border: 8px solid var(--brand-accent);
    border-radius: 16px;
  }
  
  .about-text {
    font-size: 1.15rem;
    line-height: 1.3;
  }
}

/* Contact Form */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 100%;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.contact-form input, .contact-form textarea {
  padding: 0.6rem;
  border: 1px solid var(--brand-secondary);
  border-radius: 4px;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .contact-form {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0;
  }
}

/* Thank You Page */
.thank-you {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  padding: 1rem;
}

.thank-you__container {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.thank-you__container h1 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .thank-you { 
    min-height: 60vh; 
    padding: 2rem; 
  }
  
  .thank-you__container {
    padding: 2rem 3rem;
    max-width: 600px;
  }
  
  .thank-you__container h1 { font-size: 2rem; }
}

/* =========================
   13. Advertisements & Utility
   ========================= */
.ad-banner {
  margin: 1.5rem 0;
  text-align: center;
}

.ad-placeholder {
  display: inline-block;
  padding: 0.75rem;
  border: 2px dashed var(--brand-secondary);
  background-color: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.85rem;
}

.ad-placeholder .ad-box {
  width: 300px;
  height: 80px;
  max-width: 100%;
  background-color: #ddd;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #666;
}

.below-image-slot {
  margin: 2rem 0;
  padding: 1.5rem;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  text-align: center;
  background-color: #fafafa;
}

.below-image-slot img {
  max-width: 180px;
  height: auto;
  display: inline-block;
}

.below-image-slot p {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.below-image-slot a {
  color: inherit;
  text-decoration: none;
}

.below-image-slot a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .ad-banner { margin: 2rem 0; }
  .ad-placeholder {
    padding: 1rem;
    font-size: 0.9rem;
  }
  .ad-placeholder .ad-box {
    width: 400px;
    height: 100px;
    font-size: 0.8rem;
  }
  
  .below-image-slot {
    margin: 2.5rem 0;
    padding: 2rem;
  }
  .below-image-slot img { max-width: 220px; }
}

.section-highlight {
  background-color: var(--brand-light);
  padding: 0.75rem;
}

@media (min-width: 768px) {
  .section-highlight { padding: 1rem; }
}

/* =========================
   14. Tooltips
   ========================= */
.definition-tooltip {
  border-bottom: 2px dotted var(--brand-accent);
  cursor: help;
  position: relative;
  display: inline;
  color: var(--brand-accent);
  font-weight: 500;
}

.definition-tooltip:hover {
  border-bottom-color: var(--brand-primary);
  color: var(--brand-primary);
}

.definition-tooltip:hover::after {
  content: attr(data-definition);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(51, 51, 51, 0.95);
  color: white;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: normal;
  line-height: 1.4;
  white-space: normal;
  max-width: 320px;
  width: max-content;
  min-width: 200px;
  word-wrap: break-word;
  text-align: left;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-out forwards;
}

.definition-tooltip:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  border: 6px solid transparent;
  border-top-color: rgba(51, 51, 51, 0.95);
  z-index: 1001;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-out forwards;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 768px) {
  .definition-tooltip:hover::after {
    max-width: 280px;
    font-size: 0.8rem;
    padding: 0.6rem;
    left: 0;
    transform: translateX(0);
    margin-left: -10px;
  }
  
  .definition-tooltip:hover::before {
    left: 20px;
    transform: translateX(0) translateY(100%);
  }
}

/* =========================
   15. Grid Layout & Misc
   ========================= */
.article-main-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .article-main-grid {
    flex-direction: row;
    align-items: flex-start;
  }

  .article-left {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .article-body {
    flex: 1;
    min-width: 0;
  }

  .sticky-hero-wrap {
    position: sticky;
    top: 1.5rem;
    z-index: 2;
  }

  .sticky-ad-wrap {
    position: sticky;
    top: calc(1.5rem + 260px + 1.5rem);
    z-index: 1;
  }
}

@media (max-width: 767px) {
  .sticky-hero-wrap, .sticky-ad-wrap {
    position: static;
    top: auto;
  }
}

.book-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.book-row img {
  width: 120px;
  min-width: 120px;
  height: auto;
  flex-shrink: 0;
}

/* =========================
   16. Print & High Contrast
   ========================= */
@media print {
  .site-nav, .article-back, .related-articles, .ad-banner, 
  .search-container, .definition-tooltip::after, .definition-tooltip::before {
    display: none !important;
  }
  
  body { font-size: 12pt; line-height: 1.4; }
  .article-hero, .article-footer { 
    background: none !important; 
    border: 1px solid #ccc; 
  }
  .definition-tooltip { 
    border-bottom: none; 
    color: inherit; 
    font-weight: inherit; 
  }
}

@media (prefers-contrast: high) {
  .definition-tooltip {
    border-bottom-style: solid;
    border-bottom-width: 2px;
  }
  
  .definition-tooltip:hover::after {
    background: #000;
    border: 2px solid #fff;
  }
  
  .definition-tooltip:hover::before {
    border-top-color: #000;
  }
}
