/* === TheLastHeadline.com - Clean Editorial === */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700&display=swap');

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

/* ============================================
   COMMON TRANSITIONS
   ============================================ */

body,
.site-header,
nav,
main,
footer,
.featured-post,
.featured-inner,
.featured-image,
.featured-content,
.archive-card,
.about-page,
.post-page,
a {
  transition: all 0.25s ease;
}

/* ============================================
   CLEAN EDITORIAL THEME
   ============================================ */

body {
  font-family: 'Public Sans', Arial, sans-serif;
  background: #faf7f2;
  color: #1e2430;
  line-height: 1.6;
}

/* Header */
.site-header {
  background: #faf7f2;
  color: #1e2430;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  border-bottom: 1px solid #e2ddd3;
}

.site-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.site-logo {
  height: 52px;
  width: auto;
  display: block;
}

.site-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: #1e2430;
  background: none;
  -webkit-text-fill-color: unset;
}

.site-title span { color: #b8923c; }

.site-tagline {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.9rem;
  color: #6b6258;
  margin-top: 0.5rem;
}

/* Nav */
nav {
  background: #faf7f2;
  padding: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #e2ddd3;
}

nav a {
  color: #1e2430;
  text-decoration: none;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 1rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}

nav a:hover { color: #b8923c; border-bottom-color: #b8923c; }

/* Search form (ticket #10874) - plain nav input, submits to /search/ */
#nav-search {
  display: inline-block;
  vertical-align: middle;
  margin-left: auto;
}

#nav-search input[type="search"] {
  width: 160px;
  max-width: 45vw;
  padding: 0.35rem 0.6rem;
  background: #faf7f2;
  border: 1px solid #e2ddd3;
  border-radius: 4px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.85rem;
  color: #1e2430;
}

.pagefind-ui {
  --pagefind-ui-scale: 0.8;
  --pagefind-ui-primary: #b8923c;
  --pagefind-ui-text: #1e2430;
  --pagefind-ui-background: #faf7f2;
  --pagefind-ui-border: #e2ddd3;
  --pagefind-ui-tag: #e2ddd3;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 4px;
  --pagefind-ui-image-border-radius: 4px;
  --pagefind-ui-image-box-ratio: 1;
  --pagefind-ui-font: 'Public Sans', sans-serif;
}

.pagefind-ui__search-input {
  font-family: 'Public Sans', sans-serif;
}

/* Main */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

/* Featured row -- up to 3 most-recently-live posts (#10889) */
.featured-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.featured-row .featured-post {
  margin-bottom: 0;
  container-type: inline-size;
  container-name: featuredpost;
}

/* Below this width, 1fr/1fr can't give the image column a usable share
   (long headline/category text has real min-content width; the image,
   being width:100%, has ~0) -- stack instead of split (#10889) */
@container featuredpost (max-width: 420px) {
  .featured-row .featured-inner {
    grid-template-columns: 1fr;
  }
}

/* Featured post */
.featured-post {
  background: #fffdf9;
  border: 1px solid #e2ddd3;
  border-radius: 6px;
  position: relative;
  margin-bottom: 3rem;
  padding: 2.5rem;
}

.featured-badge {
  display: block;
  color: #b8923c;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.featured-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.featured-image {
  background: #f2e9e1;
  border: 1px solid #e2ddd3;
  border-radius: 4px;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.featured-image-link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
}

.featured-image-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
}

.featured-image-tag {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(43, 38, 32, 0.65);
  color: #fffdf9;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.featured-content {
  padding: 0;
}

.post-number {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.8rem;
  color: #6b6258;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e2ddd3;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.featured-content h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #1e2430;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.price-tag {
  display: block;
  color: #8a8074;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.excerpt {
  font-size: 0.95rem;
  color: #5c5347;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.read-more {
  display: inline-block;
  background: transparent;
  color: #b8923c;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.4rem;
  text-decoration: none;
  border: 1px solid #b8923c;
  border-radius: 4px;
}

.read-more:hover {
  background: #b8923c;
  color: #ffffff;
}

/* Archive */
.section-header {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #1e2430;
  border-bottom: 1px solid #e2ddd3;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  text-align: left;
}

.section-header::after { display: none; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem 2rem;
}

.archive-card {
  background: transparent;
  border-top: 1px solid #e2ddd3;
  padding: 1.5rem 0;
  position: relative;
}

.archive-card:hover {
  background: transparent;
}

.card-date {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.75rem;
  color: #8a8074;
  letter-spacing: 0.02em;
}

.archive-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0.5rem 0;
}

.archive-card h3 a {
  color: #1e2430;
  text-decoration: none;
}

.archive-card h3 a:hover { color: #b8923c; text-decoration: underline; }

.card-thumb-link {
  display: block;
  text-decoration: none;
}

.card-thumb {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #f2e9e1;
  border: 1px solid #e2ddd3;
  border-radius: 4px;
  margin: 0.75rem 0;
}

.card-excerpt {
  font-size: 0.88rem;
  color: #6b6258;
  line-height: 1.6;
}

.new-badge {
  display: block;
  position: absolute;
  top: 1.5rem;
  right: 0;
  color: #b8923c;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

/* About page */
.about-page {
  background: #fffdf9;
  border: 1px solid #e2ddd3;
  border-radius: 6px;
  padding: 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.about-page::before { display: none; }

.about-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #1e2430;
  border-bottom: 1px solid #e2ddd3;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  background: none;
  -webkit-text-fill-color: unset;
}

.about-page h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: #1e2430;
}

.about-page p {
  margin-bottom: 1.1rem;
  line-height: 1.7;
  color: #1e2430;
}

.contact-box {
  background: #f2ece3;
  border: none;
  border-radius: 6px;
  padding: 1.75rem;
  margin-top: 2rem;
  text-align: center;
}

.contact-box a {
  color: #b8923c;
  font-weight: 600;
  font-family: 'Public Sans', sans-serif;
}

/* Post page */
.post-page {
  background: #fffdf9;
  border: 1px solid #e2ddd3;
  border-radius: 6px;
  padding: 3rem;
  max-width: 750px;
  margin: 0 auto;
}

.post-page::before { display: none; }

.post-meta {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.8rem;
  color: #6b6258;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e2ddd3;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
}

.post-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.3rem;
  font-weight: 600;
  color: #1e2430;
  line-height: 1.3;
  margin-bottom: 2rem;
}

.post-body p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  font-size: 1.05rem;
  color: #1e2430;
}

.post-body h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e2430;
  line-height: 1.35;
  margin: 2.5rem 0 1rem;
}

.post-body ul {
  margin: 1rem 0 1.25rem 1.5rem;
  line-height: 1.8;
  color: #1e2430;
}

.post-body a { color: #b8923c; text-decoration: underline; }

.post-body strong { color: #1e2430; }

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.85rem;
}

.post-body th, .post-body td {
  border: 1px solid #e2ddd3;
  padding: 0.4rem 0.5rem;
  text-align: center;
  color: #1e2430;
}

.post-body th {
  background: #f5f0e8;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
}

.post-body td:first-child, .post-body th:first-child {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 500px;
}

figcaption {
  display: block;
  font-family: 'Public Sans', sans-serif;
  font-style: italic;
  font-size: 0.85rem;
  color: #8a8074;
  margin-top: 0.5rem;
  text-align: center;
}

.post-figure {
  margin: 2rem auto;
  text-align: center;
}

.post-figure img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 12px;
}

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  color: #b8923c;
  text-decoration: none;
}

.back-link:hover { color: #1e2430; }

/* More Stories footer (post pages) */
.more-stories {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2ddd3;
}

.more-stories h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e2430;
  margin-bottom: 1rem;
}

.more-stories ul {
  list-style: none;
  margin: 0 0 1.25rem;
}

.more-stories li {
  padding: 0.5rem 0;
  border-top: 1px solid #efe9e0;
  font-size: 0.95rem;
}

.more-stories li:first-child { border-top: none; }

.more-stories .more-date {
  color: #8a8074;
  font-size: 0.8rem;
  font-family: 'Public Sans', sans-serif;
  margin-right: 0.5rem;
}

.more-stories a {
  color: #1e2430;
  text-decoration: none;
}

.more-stories a:hover { color: #b8923c; text-decoration: underline; }

.more-stories .see-archive {
  display: inline-block;
  font-weight: 600;
  color: #b8923c;
}

.more-stories .see-archive:hover { text-decoration: underline; }

/* Full archive index page */
.full-index-page {
  background: #fffdf9;
  border: 1px solid #e2ddd3;
  border-radius: 6px;
  padding: 3rem;
  max-width: 750px;
  margin: 0 auto;
}

.full-index-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #1e2430;
  margin-bottom: 0.5rem;
}

.full-index-intro {
  font-size: 0.9rem;
  color: #6b6258;
  border-bottom: 1px solid #e2ddd3;
  padding-bottom: 1.5rem;
  margin-bottom: 0.5rem;
}

.full-index-list {
  list-style: none;
}

.full-index-list li {
  padding: 0.65rem 0;
  border-top: 1px solid #efe9e0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.full-index-list li:first-child { border-top: none; }

.full-index-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: #f2e9e1;
  border: 1px solid #e2ddd3;
  border-radius: 4px;
  flex-shrink: 0;
}

.full-index-text {
  min-width: 0;
}

.full-index-date {
  display: inline-block;
  min-width: 100px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.8rem;
  color: #8a8074;
}

.full-index-list a {
  color: #1e2430;
  text-decoration: none;
  font-size: 0.95rem;
}

/* Search results page (ticket #10874) - full main width, not the small nav footprint */
.search-page {
  background: #fffdf9;
  border: 1px solid #e2ddd3;
  border-radius: 6px;
  padding: 3rem;
}

.search-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: #1e2430;
  border-bottom: 1px solid #e2ddd3;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
}

.full-index-list a:hover { color: #b8923c; text-decoration: underline; }

/* Archive "see all" link on homepage */
.archive-see-all {
  margin: -1.25rem 0 1.5rem;
}

.archive-see-all a {
  font-family: 'Public Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #b8923c;
  text-decoration: none;
}

.archive-see-all a:hover { text-decoration: underline; }

/* Footer */
footer,
.site-footer {
  background: #faf7f2;
  color: #6b6258;
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.85rem;
  border-top: 1px solid #e2ddd3;
}

footer a,
.site-footer a { color: #b8923c; text-decoration: none; }


/* ============================================
   SHARE FEATURE
   ============================================ */

.share-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.share-featured-wrap {
  display: block;
  margin-top: 1rem;
}

.share-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  transition: all 0.2s ease;
  background: transparent;
  color: #6b6258;
  border: 1px solid #e2ddd3;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  border-radius: 4px;
}

.share-button:hover {
  background: #b8923c;
  color: #ffffff;
  border-color: #b8923c;
}

.share-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  min-width: 160px;
  max-width: 200px;
  padding: 0.35rem;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: #fffdf9;
  border: 1px solid #e2ddd3;
  border-radius: 4px;
}

.share-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.share-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  color: #1e2430;
  font-family: 'Public Sans', sans-serif;
  border-radius: 4px;
}

.share-option:hover {
  background: #f2ece3;
  color: #b8923c;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 700px) {
  .site-title { font-size: 1.8rem; }
  .site-logo { height: 38px; }
  .site-title-row { gap: 0.6rem; }
  .featured-row { grid-template-columns: 1fr; }
  .featured-post { padding: 1.75rem; }
  .featured-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .featured-image { min-height: 200px; }
  .featured-image-img { min-height: 200px; }
  .card-thumb { height: 150px; }
  .about-page,
  .post-page,
  .full-index-page { padding: 1.75rem; }

  .full-index-date { display: block; margin-bottom: 0.15rem; }
  .full-index-thumb { width: 44px; height: 44px; }

  nav a { margin: 0 0.65rem !important; font-size: 0.85rem !important; }

  #nav-search input[type="search"] {
    width: 110px;
    max-width: 55vw;
  }
}
