/* ============================================================
   Academic Journal-Style Design System
   Inspired by shitjournal.org / S.H.I.T Journal
   ============================================================ */

/* === CSS Variables === */
:root {
  --color-paper: #F9F9F9;
  --color-charcoal: #333333;
  --color-charcoal-light: #555555;
  --color-accent-gold: #C5A02F;
  --color-border-light: #E0E0E0;
  --color-accent-red: #D12F2F;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --max-width: 960px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-charcoal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-gold);
}

img { max-width: 100%; }

/* === Site Wrapper === */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header === */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--color-charcoal);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-title-link {
  text-decoration: none;
  color: var(--color-charcoal);
}

.site-title-link:hover {
  color: var(--color-charcoal);
}

.site-title-main {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  line-height: 1.3;
  color: var(--color-charcoal);
}

.site-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-gray-500);
  margin: 0.75rem 0 0;
}

/* === Secondary Nav / Search Bar === */
.secondary-nav {
  background: #F2F2F2;
  border-bottom: 1px solid #D1D5DB;
  padding: 0.6rem 1.5rem;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === Search === */
.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  stroke: #888;
  z-index: 1;
}

#search-input {
  width: 100%;
  padding: 8px 15px 8px 38px;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  border: 1px solid var(--color-border-light);
  border-radius: 0;
  background: #fff;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

#search-input:focus {
  outline: none;
  border-color: var(--color-accent-gold);
  box-shadow: 0 0 0 2px rgba(197, 160, 47, 0.15);
}

#search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: #fff;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
}

#search-results:empty { display: none; }

#search-results li a {
  display: block;
  padding: 10px 15px;
  color: var(--color-charcoal);
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
#search-results li:last-child a { border-bottom: none; }

#search-results li a:hover {
  background-color: #FFFBEB;
  color: var(--color-charcoal);
}

.search-result-snippet {
  font-size: 0.8em;
  color: var(--color-gray-600);
  display: block;
  line-height: 1.5;
  padding: 0.5rem 1rem 0;
}

.search-result-snippet mark {
  background-color: #FDE68A;
  color: var(--color-charcoal);
  font-weight: 600;
  padding: 1px 2px;
  border-radius: 2px;
}

#search-results .no-results {
  padding: 12px 15px;
  color: var(--color-gray-500);
  text-align: center;
  font-style: italic;
  font-size: 0.85rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Main Content === */
.site-main {
  flex: 1;
  padding: 2rem 1.5rem;
}

.main-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === Footer === */
.site-footer {
  background: #1a1a1a;
  color: #e5e5e5;
  padding: 3.5rem 1.5rem 2.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #fff;
}

.footer-desc {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #888;
  margin: 0;
}

.footer-heading {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #fff;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #333;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  color: #999;
}

#waline {
  margin-top: 1.5rem;
}

.footer-links a {
  color: #999;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-credits {
  font-size: 0.75rem;
  color: #777;
  margin: 0 0 0.5rem;
  line-height: 1.8;
}

.footer-note {
  font-size: 0.75rem;
  color: #666;
  margin: 0 0 1rem;
}

.footer-meta {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.footer-meta a {
  color: #999;
}

.footer-meta a:hover {
  color: #fff;
}

.footer-sep {
  margin: 0 0.5rem;
  color: #555;
}

/* === Language Toggle Button === */
.floating-lang-wrapper {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 1000;
}

.lang-btn {
  background: #fff;
  border: 1px solid var(--color-border-light);
  color: var(--color-charcoal);
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  border-radius: 0;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: var(--color-charcoal);
  color: #fff;
  border-color: var(--color-charcoal);
}

/* ============================================================
   POST / ARTICLE PAGE STYLES
   ============================================================ */

.post-article {
  max-width: 720px;
  margin: 0 auto;
}

.post-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.back-link {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gray-500);
}

.back-link:hover {
  color: var(--color-accent-gold);
}

.back-arrow {
  margin-right: 4px;
}

.post-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent-red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  color: var(--color-charcoal);
}

.post-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.post-divider {
  width: 60px;
  height: 3px;
  background: var(--color-charcoal);
  margin-bottom: 2rem;
}

.post-breadcrumb,
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-gray-500);
  margin: 1.5rem 0 0.5rem;
  padding: 0;
}
.post-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.post-breadcrumb ol li:not(:last-child)::after {
  content: " / ";
  margin-left: 0.3rem;
  color: var(--color-gray-400);
}
.post-breadcrumb a,
.breadcrumb a {
  color: var(--color-accent-gold);
  text-decoration: none;
}
.post-breadcrumb a:hover,
.breadcrumb a:hover {
  text-decoration: underline;
}

.post-content {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 2;
  color: var(--color-charcoal-light);
}

.post-content p {
  margin: 0 0 1.25rem;
}

.post-content h2,
.post-content h3 {
  font-family: var(--font-serif);
  color: var(--color-charcoal);
  margin-top: 2rem;
  border-bottom: none;
}

.post-content a {
  color: var(--color-accent-gold);
  border-bottom: 1px solid transparent;
}

.post-content a:hover {
  border-bottom-color: var(--color-accent-gold);
}

.post-content blockquote {
  border-left: 3px solid var(--color-accent-gold);
  margin: 1.5rem 0;
  padding: 0.5rem 1.5rem;
  color: var(--color-gray-600);
  font-style: italic;
}

/* ============================================================
   HOME PAGE STYLES
   ============================================================ */

/* --- Changelog Panel (legacy, kept for other pages) --- */

/* --- Tab Navigation --- */
.tab {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 2px solid var(--color-charcoal);
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-paper);
}

.tab button.tablinks {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-charcoal-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.tab button:hover:not(.active) {
  color: var(--color-accent-gold);
}

.tab button.active {
  color: var(--color-charcoal);
  border-bottom-color: var(--color-accent-gold);
}

.tabcontent {
  display: none;
  padding: 0;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Photos iframe --- */
.photos-iframe-wrapper {
  width: 100%;
  height: calc(100vh - 120px);
  min-height: 500px;
}
.photos-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 6px;
}

/* --- Chronology (年谱) --- */
.chronology-year-nav {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
/* When inside home page tabs, offset for the sticky tab bar */
.tabcontent .chronology-year-nav {
  top: 42px;
}
/* Home page: decade tabs + year grid picker */
.chrono-picker {
  background: var(--color-paper, #fff);
  border-bottom: 1px solid #e0e0e0;
  padding: 0.4rem 0 0.5rem;
  position: sticky;
  top: 42px;
  z-index: 50;
}
.chrono-picker-decades {
  display: flex;
  gap: 0.1rem;
  margin-bottom: 0.4rem;
}
.chrono-picker-decade {
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  padding: 4px 7px;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.chrono-picker-decade:hover {
  background: #f0f0f0;
  color: #555;
  text-decoration: none;
}
.chrono-picker-decade.active {
  background: #333;
  color: #fff;
}
.chrono-picker-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.chrono-picker-year {
  font-size: 0.82rem;
  color: #2563eb;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.chrono-picker-year:hover {
  background-color: #e8f0fe;
  text-decoration: none;
}
.chrono-picker-year.active {
  background-color: #2563eb;
  color: #fff;
  font-weight: 600;
}
.chrono-picker-year[style*="display: none"] {
  /* hidden years don't take space */
}
/* Mobile: collapse year nav behind a toggle */
.chronology-year-nav-toggle {
  display: none;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  padding: 0.2rem 0;
  text-align: left;
}
.chronology-year-nav-toggle::after {
  content: ' ▼';
  font-size: 0.7rem;
}
.chronology-year-nav.is-collapsed .chronology-year-nav-toggle::after {
  content: ' ▶';
}
.chronology-year-nav.is-collapsed .chronology-year-nav-row {
  display: none;
}
@media (max-width: 600px) {
  .chronology-year-nav-toggle {
    display: block;
  }
  .chronology-year-nav.is-collapsed {
    padding: 0.5rem 1rem;
  }
}
.chronology-year-nav-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.2rem 0;
  flex-wrap: wrap;
}
.chronology-decade-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #999;
  min-width: 45px;
  flex-shrink: 0;
}
.chronology-year-link {
  font-size: 0.85rem;
  color: #2563eb;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.chronology-year-link:hover {
  background-color: #e8f0fe;
  text-decoration: none;
}
.chronology-year-link.active {
  background-color: #2563eb;
  color: #fff;
  font-weight: 600;
}
.chronology-year-link.active:hover {
  background-color: #1d4ed8;
}
.chronology-year-section {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 1.5s;
}
.chronology-year-section:first-of-type {
  border-top: 1px solid #e5e7eb;
}
.chronology-year-section.highlight {
  background-color: #fffde7;
  transition: background-color 0s;
}
.chronology-year-summary {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.7rem 0;
  cursor: pointer;
  list-style: none;
  outline: none;
  margin-bottom: 0 !important;
  transition: background-color 0.2s;
  color: #1a1a1a;
  border-bottom: 2px solid transparent;
}
details.chronology-year-section[open] > .chronology-year-summary {
  border-bottom-color: #3b82f6;
}
.chronology-year-summary:hover {
  background-color: #f7f7f7;
}
.chronology-year-summary::-webkit-details-marker { display: none; }
.chronology-year-summary::before {
  content: '\2212';
  font-family: monospace;
  font-weight: bold;
  font-size: 1rem;
  margin-right: 12px;
  color: #3b82f6;
  display: inline-block;
  width: 20px;
  text-align: center;
}
details.chronology-year-section:not([open]) > .chronology-year-summary::before {
  content: '+';
}
.chronology-entries {
  padding: 0 0 1rem 0;
  margin: 0;
}
.chronology-entry {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  align-items: flex-start;
  border-bottom: 1px solid #f0f0f0;
}
.chronology-entry:last-child {
  border-bottom: none;
}
.chronology-date {
  flex-shrink: 0;
  min-width: 85px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
  line-height: 1.6;
  align-self: flex-start;
}
.chronology-content {
  flex: 1;
  min-width: 0;
}
.chronology-content p {
  margin: 0 0 0.3rem 0;
  font-size: 14.5px;
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: break-word;
}
.chronology-source {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 0.4rem;
  word-break: break-all;
}
.chronology-source .source-label {
  display: inline-block;
  background: #e8f4fd;
  padding: 1px 8px;
  border-radius: 10px;
  margin-right: 2px;
}
.chronology-source a {
  color: #2563eb;
  text-decoration: none;
}
.chronology-source a:hover {
  text-decoration: underline;
}
.chronology-note {
  font-size: 0.84rem;
  color: #6b7280;
  font-style: italic;
  border-left: 3px solid #3b82f6;
  padding: 0.4rem 0.8rem;
  background-color: #f0f7ff;
  margin-top: 0.4rem;
  line-height: 1.7;
  overflow-wrap: break-word;
  word-break: break-word;
}
.chronology-detail-toggle {
  margin-top: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #f9fafb;
  overflow: hidden;
}
.chronology-detail-toggle summary {
  font-size: 0.8rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 5px 12px;
  margin-bottom: 0 !important;
  font-weight: normal;
  user-select: none;
}
.chronology-detail-toggle summary:hover {
  background-color: #f0f0f0;
  color: #6b7280;
}
.chronology-detail-toggle summary::before {
  content: '' !important;
  margin-right: 0 !important;
  width: 0 !important;
}
.chronology-detail-text {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #4b5563;
  line-height: 1.8;
  border-top: 1px solid #e5e7eb;
  background: #fafbfc;
  max-height: 400px;
  overflow-y: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}
.chronology-detail-text p {
  margin: 0.4rem 0;
}

/* --- News Chiclet Cards --- */
.news-chiclet-list {
  padding: 1.5rem 0;
}

.news-chiclet {
  background: #fff;
  border: 1px solid var(--color-border-light);
  padding: 2rem 2.5rem;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s ease;
}

.news-chiclet:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.news-chiclet-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent-red);
}

.news-chiclet-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-charcoal);
  margin: 0.5rem 0 0.25rem;
  line-height: 1.4;
}

.news-chiclet-date {
  font-size: 0.8rem;
  color: var(--color-gray-400);
  font-family: var(--font-sans);
}

.news-chiclet-changes {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.news-chiclet-changes li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
  font-family: var(--font-serif);
  line-height: 1.7;
  color: var(--color-charcoal-light);
}

.news-chiclet-changes li::before {
  content: '\2014';
  margin-right: 0.5rem;
  color: var(--color-gray-400);
}

.news-chiclet-changes li a {
  color: var(--color-charcoal-light);
  border-bottom: 1px solid transparent;
}

.news-chiclet-changes li a:hover {
  color: var(--color-accent-gold);
  border-bottom-color: var(--color-accent-gold);
}

/* --- Article Chiclet Cards (Books / Telegram / Newspaper) --- */
.chiclet-grid {
  padding: 0.5rem 0 1rem;
}

.article-chiclet {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border-light);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: var(--color-charcoal);
  transition: box-shadow 0.2s ease;
}

.article-chiclet:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  color: var(--color-charcoal);
}

.article-chiclet-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent-red);
}

.article-chiclet-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-charcoal);
  margin: 0.35rem 0 0.2rem;
  line-height: 1.4;
}

.article-chiclet:hover .article-chiclet-title {
  color: var(--color-accent-gold);
}

.article-chiclet-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gray-500);
  margin-right: 0.75rem;
}

.article-chiclet-date {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  font-family: var(--font-sans);
}

.article-chiclet-body {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--color-charcoal-light);
  margin: 0.5rem 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* --- Collapsible Book/Section --- */
.collapsible-book {
  border-bottom: 1px solid var(--color-border-light);
}

.collapsible-book:first-of-type {
  border-top: 1px solid var(--color-border-light);
}

summary {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 0;
  cursor: pointer;
  list-style: none;
  outline: none;
  margin-bottom: 0 !important;
  transition: color 0.2s;
  color: var(--color-charcoal);
}

summary:hover {
  color: var(--color-accent-gold);
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: '\2212';
  font-family: monospace;
  font-weight: bold;
  font-size: 1rem;
  margin-right: 12px;
  color: var(--color-gray-400);
  display: inline-block;
  width: 20px;
  text-align: center;
}

details:not([open]) > summary::before { content: '+'; }

.collapsible-book ul {
  list-style-type: none;
  padding: 0.25rem 0 1rem 2.5rem;
  margin: 0;
}

.collapsible-book li {
  padding: 0.2rem 0;
  border: none;
}

.collapsible-book li a {
  color: var(--color-charcoal-light);
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
}

.collapsible-book li a:hover {
  color: var(--color-accent-gold);
  border-bottom-color: var(--color-accent-gold);
}

/* --- Timeline view --- */
.timeline-list {
  list-style-type: none;
  padding-left: 0;
}

.timeline-list li,
.timeline-list-no-date li {
  display: flex;
  align-items: baseline;
  padding: 0.2rem 0;
}

.timeline-date {
  margin: 0 1rem;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-accent-red);
  letter-spacing: 0.05em;
  font-family: var(--font-sans);
}

.unknown-date-header {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid #ccc;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Floating Buttons --- */
.floating-toggle-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: none;
}

.floating-toggle-btn {
  background: #fff;
  border: 1px solid var(--color-border-light);
  color: var(--color-charcoal);
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  border-radius: 0;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.floating-toggle-btn:hover {
  background: var(--color-charcoal);
  color: #fff;
  border-color: var(--color-charcoal);
}

.floating-quiz-wrapper {
  position: fixed;
  bottom: 60px;
  right: 24px;
  z-index: 1000;
}

.floating-quiz-btn {
  background: var(--color-accent-gold);
  color: #fff;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  border: none;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(197, 160, 47, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.floating-quiz-btn:hover {
  background: #B18E26;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 160, 47, 0.4);
}

/* --- Subscribe Icon + Dropdown --- */
.subscribe-icon-wrapper {
  margin-left: auto;
  position: relative;
}

.subscribe-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  color: var(--color-gray-500);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.subscribe-icon-btn:hover {
  color: var(--color-accent-gold);
}

.subscribe-dropdown {
  display: none;
  position: fixed;
  top: auto;
  right: 1rem;
  background: #fff;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  z-index: 200;
  width: 260px;
}

.subscribe-dropdown.open {
  display: block;
}

.subscribe-dropdown-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-charcoal);
  margin: 0 0 0.5rem;
}

.subscribe-dropdown-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subscribe-dropdown-form input {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  border: 1px solid var(--color-border-light);
  outline: none;
}

.subscribe-dropdown-form input:focus {
  border-color: var(--color-accent-gold);
}

.subscribe-dropdown-form button {
  padding: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--color-charcoal);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.subscribe-dropdown-form button:hover {
  background: var(--color-accent-gold);
}

/* --- Footer View Switcher --- */
.footer-view-switcher {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-light);
}

.footer-view-switcher .switch-btn {
  background: none;
  border: none;
  color: var(--color-gray-500);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  margin: 0 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.footer-view-switcher .switch-btn:hover {
  color: var(--color-accent-gold);
}

.footer-view-switcher .switch-btn.active {
  color: var(--color-charcoal);
  border-bottom-color: var(--color-accent-gold);
  cursor: default;
}

/* --- Section Headers (Tools, Downloads, etc.) --- */
h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-charcoal);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-charcoal);
  margin: 2.5rem 0 1rem;
}

/* General list styling for tools/downloads sections */
.main-inner > ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.main-inner > ul > li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.main-inner > ul > li:last-child {
  border-bottom: none;
}

.main-inner > ul > li a {
  color: var(--color-charcoal-light);
}

.main-inner > ul > li a:hover {
  color: var(--color-accent-gold);
}

/* --- Original View (home.html) --- */
.home h2 {
  display: inline;
  text-decoration: none;
  font-family: var(--font-serif);
}

summary h2 {
  display: inline;
  font-size: 1rem;
  border: none;
  margin: 0;
  padding: 0;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .site-title-main {
    font-size: 1.5rem;
    letter-spacing: 0.04em;
  }

  .site-subtitle {
    font-size: 0.6rem;
  }

  .site-header {
    padding: 1.5rem 1rem 1.25rem;
  }

  .secondary-nav {
    padding: 0.5rem 1rem;
  }

  .site-main {
    padding: 1.25rem 1rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .tab button {
    padding: 0.5rem 0.75rem;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }

  .news-chiclet {
    padding: 1.25rem 1rem;
  }

  .news-chiclet-title {
    font-size: 1.1rem;
  }

  .article-chiclet {
    padding: 1rem;
  }

  .article-chiclet-title {
    font-size: 0.95rem;
  }

  .footer-grid {
    gap: 1.5rem;
  }

  .floating-lang-wrapper {
    bottom: 80px;
    right: 16px;
  }

  .floating-toggle-wrapper,
  .floating-quiz-wrapper {
    right: 16px;
  }

  .floating-toggle-wrapper {
    bottom: 16px;
  }

  .floating-quiz-wrapper {
    bottom: 48px;
  }

  .chronology-entry {
    flex-direction: column;
    gap: 0.2rem;
  }
  .chronology-date {
    min-width: auto;
    font-size: 0.8rem;
    align-self: flex-start;
  }
  .chronology-year-nav-row {
    gap: 0.3rem;
  }
  .chronology-decade-label {
    min-width: 40px;
  }
}
