/* Base */
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0; color: #333; background: #f9f9f9;
  display: flex; flex-direction: column; align-items: center;
}

/* Nav */
nav {
  width: 100%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
  padding: 1rem 0; position: fixed; top: 0; left: 0; z-index: 1000;
  display: flex; justify-content: center; gap: 1.5rem;
}
nav a {
  color: #0a66ff; text-decoration: none; font-weight: 600;
}
nav a.active { text-decoration: underline; }

/* Layout */
main { max-width: 800px; width: 100%; padding: 6rem 1.25rem 3rem; margin: 0 auto; }
h1 { font-size: 2rem; margin: 0 0 1rem; text-align: center; }
h2 { font-size: 1.5rem; margin: 2rem 0 .5rem; text-align: center;}
p, li { font-size: 1.1rem; line-height: 1.6; }

/* Home hero */
.hero {
  display: grid; place-items: center; text-align: center; min-height: calc(100vh - 7rem);
}
.hero img { max-width: 280px; width: 70%; height: auto; filter: grayscale(100%); opacity: .9; }
.hero .tag { margin-top: 1rem; font-size: 1.2rem; }
.hero a { color: #0a66ff; text-decoration: none; }

/* Footnotes / disclaimers */
.footnote { 
    font-size: .9rem; 
    color: #666; 
    margin-top: 1rem; 
    /* text-align: center;  */
}

/* Footnote anchors: keep clean, no underline */

a {
  text-decoration: none; 
  color: inherit; 
  font-weight: 600;
} 

a.active {
    text-decoration: underline;
}

/* Flash/hilight effect */

@keyframes highlight-flash {
  0%   { background-color: #fffbcc; }
  100% { background-color: transparent; }
}

.flash {
  animation: highlight-flash 1.5s ease-out;
}

/* Bootstrap integration tweaks */
body { padding-top: 72px; }
.navbar-brand { font-weight: 700; }
.footnote { font-size: 0.9rem; color: #6c757d; }

/* Home page central links */
.home-links a {
  display: inline-block;
  /* font-size: 1.15rem; follow fs-* from parent */
  font-weight: 600;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #ccc; /* subtler */
  padding: 0.1em 0;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.home-links {
  font-size: 0.9rem !important;
}

.home-links a:hover {
  color: #000;
  border-bottom-color: #0a66ff; /* brand accent on hover */
}

.collapse {
  border-left: 3px solid #ddd;
  margin-left: 1rem;
  padding-left: 1rem;
}

/* Blog post previews */
.post-card {
  cursor: pointer;
}
.post-card .card-body {
  position: relative;
}
.post-card .fade-mask {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(249, 249, 249, 0), rgba(249, 249, 249, 1));
  display: block;
}
.post-card.expanded .fade-mask {
  display: none;
}
.post-card .read-more {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.sub-collapse {
  border-left: 3px solid #ddd;
  margin-left: 1rem;
  padding-left: 1rem;
}

/* Limit indentation to subsection collapses only (not whole-post previews) */
.post-card > .card-body > .collapse {
  border-left: 0 !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}
/* Hide preview fade and label only when the post itself is expanded */
.post-collapse.show ~ .fade-mask,
.post-collapse.show ~ .read-more {
  display: none !important;
}

/* Prevent vertically stretched price badges */
.list-group-item.d-flex {
  align-items: center;          /* vertically center items */
}

.list-group-item .badge {
  flex-shrink: 0;               /* prevent badge from stretching */
  align-self: center;           /* vertically center */
  white-space: nowrap;          /* keep prices one-line */
  padding: 0.35em 0.75em;       /* consistent sizing */
  font-size: 0.9rem;
}