/* ALCHEMYTIMELINEMAP Global Styles */

:root {
  --primary-color: #3a4a5c;
  --secondary-color: #8b6f47;
  --accent-color: #5a7a9a;
  --text-color: #333;
  --light-bg: #f5f3f0;
  --border-color: #d9d3ce;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.65;
  letter-spacing: 0.3px;
  color: var(--text-color);
  background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h1 {
  font-size: 2.5em;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2em;
  font-weight: 600;
  margin-top: 1.5em;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5em;
}

h3 {
  font-size: 1.5em;
  font-weight: 600;
}

p {
  margin-bottom: 1em;
  font-size: 1em;
}

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

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

/* Digital Humanities links with tooltips */
.dh-link {
  color: var(--secondary-color);
  font-weight: 500;
  border-bottom: 1px dotted var(--secondary-color);
  transition: all 0.2s ease;
}

.dh-link:hover {
  color: var(--accent-color);
  background-color: rgba(139, 111, 71, 0.1);
  border-bottom: 1px solid var(--secondary-color);
  text-decoration: none;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
  color: white;
  padding: 3em 2em;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  color: white;
  margin-bottom: 0.5em;
  font-size: 3em;
}

header h1 a {
  color: white;
}

header h1 a:hover {
  color: var(--secondary-color);
}

header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1em;
  margin: 0.5em 0;
}

/* Navigation */
nav {
  background-color: var(--primary-color);
  padding: 0;
  sticky: top 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav li {
  margin: 0;
}

nav a {
  display: block;
  padding: 1em 1.5em;
  color: white;
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-weight: 500;
  font-size: 0.95em;
}

nav a:hover {
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
}

/* Main content */
main {
  max-width: 1200px;
  margin: 2em auto;
  padding: 0 2em;
}

section {
  margin-bottom: 3em;
  background-color: var(--light-bg);
  padding: 2em;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
}

section:first-of-type {
  background-color: white;
  border-left: 4px solid var(--accent-color);
}

/* Lists */
ul, ol {
  margin-left: 2em;
  margin-bottom: 1em;
}

li {
  margin-bottom: 0.5em;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2em;
  margin-top: 3em;
  border-top: 4px solid var(--secondary-color);
}

footer p {
  margin-bottom: 0.5em;
  font-size: 0.9em;
}

/* Map specific styles */
#map {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leaflet-container {
  font-family: var(--font-family);
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.leaflet-popup-tip-container {
  width: 100%;
}

.leaflet-popup-tip {
  background: white;
}

/* Location-specific styling */
.location-marker {
  transition: transform 0.2s ease;
}

.location-marker:hover {
  transform: scale(1.2);
}

.location-tooltip {
  background-color: rgba(0, 0, 0, 0.8) !important;
  color: white !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.leaflet-tooltip-bottom::before {
  border-bottom-color: rgba(0, 0, 0, 0.8);
}

/* Person/Text/Concept pages */
article {
  background: white;
  padding: 2em;
  border-radius: 8px;
  margin-bottom: 2em;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

article h2 {
  border-color: var(--secondary-color);
  margin-top: 0;
}

.bio, .definition, .analysis {
  line-height: 1.8;
  font-size: 1.05em;
  color: #555;
}

.metadata {
  background-color: var(--light-bg);
  padding: 1em;
  border-radius: 4px;
  margin-bottom: 1.5em;
  font-size: 0.95em;
}

.metadata strong {
  color: var(--primary-color);
}

/* Responsive design */
@media (max-width: 768px) {
  header {
    padding: 2em 1em;
  }

  header h1 {
    font-size: 2em;
  }

  nav ul {
    flex-direction: column;
  }

  nav a {
    padding: 0.8em 1.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  main {
    padding: 0 1em;
    margin: 1em auto;
  }

  section {
    padding: 1.5em;
    margin-bottom: 1.5em;
  }

  #map {
    height: 500px !important;
  }

  h1 {
    font-size: 1.8em;
  }

  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.2em;
  }

  article {
    padding: 1.5em;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5em;
  }

  nav {
    padding: 0;
  }

  nav a {
    padding: 0.6em 1em;
    font-size: 0.85em;
  }

  main {
    margin: 0.5em auto;
  }

  section {
    padding: 1em;
    margin-bottom: 1em;
  }

  #map {
    height: 400px !important;
  }

  h1 {
    font-size: 1.3em;
  }

  h2 {
    font-size: 1.1em;
  }

  article {
    padding: 1em;
  }
}

/* Timeline filters */
.timeline-filters {
  background-color: var(--light-bg);
  padding: 1.5em;
  border-radius: 6px;
  margin-bottom: 2em;
  border: 1px solid var(--border-color);
}

.filter-group {
  margin-bottom: 1.5em;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  margin-bottom: 0.5em;
  color: var(--primary-color);
  font-weight: 500;
}

.filter-options {
  margin-left: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.filter-options label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  font-weight: normal;
  cursor: pointer;
}

.filter-options input[type="checkbox"] {
  margin-right: 0.5em;
  cursor: pointer;
}

.filter-input {
  width: 100%;
  padding: 0.6em;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.95em;
  margin-bottom: 0.8em;
}

.filter-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(90, 122, 154, 0.1);
}

.concept-filter-options,
.person-filter-options {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  padding: 0.5em;
  border-radius: 4px;
  background: white;
}

.clear-filters-btn {
  display: block;
  margin-top: 1em;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.7em 1.5em;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.clear-filters-btn:hover {
  background-color: #7a6039;
}

.clear-filters-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Timeline styles */
.timeline-container {
  max-width: 900px;
  margin: 2em auto;
}

.era-section {
  margin-bottom: 3em;
  border-left: 4px solid var(--secondary-color);
  padding-left: 2em;
  position: relative;
}

.era-section h3 {
  color: var(--primary-color);
  margin-top: 0;
  font-size: 1.8em;
  margin-bottom: 1.5em;
}

.event-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.5em;
  margin-bottom: 1.5em;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.event-date {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.3em 0.8em;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  margin-bottom: 0.8em;
}

.event-location {
  color: #666;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.8em;
}

.event-description {
  color: #444;
  line-height: 1.7;
  margin-bottom: 0.5em;
}

.event-title {
  font-size: 1.2em;
  color: var(--primary-color);
  margin: 0.5em 0;
}

.event-meta-tags {
  margin-top: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
}

.meta-tag {
  display: inline-block;
  padding: 0.3em 0.7em;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
}

.concept-tag {
  background-color: rgba(90, 122, 154, 0.15);
  color: #3a4a5c;
  border: 1px solid rgba(90, 122, 154, 0.3);
}

.person-tag {
  background-color: rgba(139, 111, 71, 0.15);
  color: #6b4423;
  border: 1px solid rgba(139, 111, 71, 0.3);
}

.era-event-count {
  color: #888;
  font-size: 0.9em;
  margin-top: -0.8em;
  margin-bottom: 1.5em;
  font-style: italic;
}

.timeline-info {
  background-color: var(--light-bg);
  padding: 1em;
  border-radius: 4px;
  color: #555;
  font-size: 0.95em;
  margin-bottom: 2em;
  border-left: 3px solid var(--secondary-color);
}

.error-message {
  color: #c0392b;
  background-color: #fadbd8;
  padding: 1em;
  border-radius: 4px;
  border-left: 4px solid #c0392b;
  margin: 1em 0;
}

.event-card.hidden {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Card grid for related entities */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
  margin-bottom: 2em;
}

.entity-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.5em;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.entity-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

.card-meta {
  color: #888;
  font-size: 0.85em;
  margin-bottom: 0.8em;
  font-style: italic;
}

.card-excerpt {
  color: #555;
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 1em;
}

.card-link {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* Era control styling */
.era-control {
  z-index: 400 !important;
}

.era-control-content {
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  font-size: 12px;
}

.era-control-content h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
}

.era-control-content label {
  display: block;
  margin: 5px 0;
  cursor: pointer;
}

.era-control-content input[type="radio"] {
  margin-right: 6px;
}

/* Legend styling */
.legend {
  z-index: 400 !important;
}

.legend div {
  background: white;
  padding: 12px;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.legend h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #333;
}

.legend div div {
  background: none;
  padding: 0;
  box-shadow: none;
  margin: 5px 0;
  display: flex;
  align-items: center;
}

/* Interactive element animations */
button, input[type="button"], input[type="submit"] {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 0.8em 1.5em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

button:hover, input[type="button"]:hover, input[type="submit"]:hover {
  background-color: var(--secondary-color);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
}

th, td {
  padding: 0.8em;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--light-bg);
  font-weight: 600;
  color: var(--primary-color);
}

tr:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

/* Code blocks (if needed) */
pre {
  background-color: #f4f4f4;
  border-left: 4px solid var(--secondary-color);
  padding: 1em;
  overflow-x: auto;
  border-radius: 4px;
  margin-bottom: 1em;
}

code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #e74c3c;
}

pre code {
  color: inherit;
}

/* ── Timeline page layout ─────────────────────────────────────────────────── */

.timeline-page h2 {
  margin-top: 0.5em;
}

.timeline-info {
  color: #666;
  font-size: 0.95em;
  margin-bottom: 1.5em;
}

.timeline-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2em;
  align-items: start;
}

@media (max-width: 820px) {
  .timeline-layout {
    grid-template-columns: 1fr;
  }
}

/* Filter sidebar */
.timeline-filters {
  position: sticky;
  top: 1em;
}

.filter-panel {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2em;
}

.filter-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

.filter-panel__header h3 {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 0;
}

.btn-clear {
  font-size: 0.8em;
  padding: 0.3em 0.8em;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  color: var(--primary-color);
}

.btn-clear:hover {
  background: var(--border-color);
}

.filter-group {
  border-top: 1px solid var(--border-color);
  padding: 0.8em 0;
}

.filter-group summary {
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  color: var(--primary-color);
  padding: 0.2em 0;
}

.filter-search {
  display: block;
  width: 100%;
  margin: 0.6em 0;
  padding: 0.4em 0.7em;
  font-size: 0.85em;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.filter-chip {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  padding: 0.25em 0;
  font-size: 0.83em;
  cursor: pointer;
  word-break: break-word;
}

.filter-chip input {
  flex-shrink: 0;
  margin-top: 0.15em;
}

.filter-chip em {
  color: #888;
  font-style: normal;
}

/* Era section headings */
.era-section {
  margin-bottom: 2.5em;
}

.era-section__title {
  font-size: 1.3em;
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.4em;
  margin-bottom: 0.4em;
}

.era-section__count {
  font-size: 0.85em;
  color: #888;
  margin-bottom: 1em;
}

.era-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1em;
}

/* Timeline index cards */
.timeline-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.1em 1.2em;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.timeline-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border-color: var(--accent-color);
}

.timeline-card.hidden {
  display: none;
}

.timeline-card__meta {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  flex-wrap: wrap;
}

.timeline-card__date {
  font-weight: 700;
  font-size: 0.9em;
  color: var(--secondary-color);
  white-space: nowrap;
}

.timeline-card__location {
  font-size: 0.82em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-card__summary {
  font-size: 0.88em;
  color: #444;
  line-height: 1.6;
  flex-grow: 1;
}

.timeline-card__scholarly {
  font-size: 0.82em;
  color: #666;
  line-height: 1.5;
  font-style: italic;
  border-left: 3px solid var(--secondary-color);
  padding-left: 0.6em;
  margin: 0.3em 0;
}

.timeline-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  margin-top: 0.2em;
}

.timeline-card__link {
  display: inline-block;
  font-size: 0.82em;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  margin-top: 0.3em;
}

.timeline-card__link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Chip styles (entity links on cards) */
.chip {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
  transition: opacity 0.15s;
}

.chip:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.chip--person {
  background: rgba(58, 74, 92, 0.1);
  color: var(--primary-color);
}

.chip--concept {
  background: rgba(90, 122, 154, 0.12);
  color: var(--accent-color);
}

.chip--text {
  background: rgba(139, 111, 71, 0.12);
  color: var(--secondary-color);
}

/* Event detail page */
.event-page {
  max-width: 820px;
}

.event-page__header {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 0.5em;
}

.event-page__date {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--secondary-color);
}

.event-page__era {
  font-size: 0.85em;
  color: #888;
  background: var(--light-bg);
  padding: 0.2em 0.7em;
  border-radius: 12px;
}

.event-page__location {
  font-size: 2em;
  margin-bottom: 0.1em;
}

.event-page__region {
  color: #888;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5em;
}

.event-page__body {
  font-size: 1.05em;
  line-height: 1.8;
  margin: 1.5em 0 2em;
  color: #333;
}

.event-page__body p,
.event-page__body div {
  margin-bottom: 1em;
}

.related-section {
  border-top: 1px solid var(--border-color);
  padding-top: 1.2em;
  margin-bottom: 1.5em;
}

.related-section h3 {
  font-size: 1.1em;
  margin-bottom: 0.6em;
}

.related-section ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.related-section ul li a {
  display: inline-block;
  padding: 0.3em 0.8em;
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--primary-color);
  text-decoration: none;
  transition: border-color 0.15s;
}

.related-section ul li a:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: #fff;
}

.event-page__scholarly {
  background: var(--light-bg);
  border-left: 4px solid var(--secondary-color);
  padding: 1em 1.2em;
  margin: 1.5em 0;
  border-radius: 4px;
}

.event-page__scholarly h3 {
  font-size: 1em;
  margin-bottom: 0.5em;
}

.event-page__scholarly p {
  font-size: 0.95em;
  color: #555;
  line-height: 1.7;
  margin-bottom: 0;
}

.event-page__provenance {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid var(--border-color);
  color: #999;
}

/* Enhanced event card styles for map popups */
.event-card__date {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.5em;
  font-size: 0.95em;
}

.event-card__description {
  font-size: 0.9em;
  color: #444;
  line-height: 1.6;
  margin-bottom: 0.8em;
  max-height: 100px;
  overflow-y: auto;
  padding-right: 0.5em;
}

.event-card__entities {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 0.6em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.event-card__entities a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.event-card__entities a:hover {
  text-decoration: underline;
  color: var(--secondary-color);
}

.event-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-top: 0.6em;
}

.event-tag {
  display: inline-block;
  background-color: rgba(90, 122, 154, 0.1);
  color: var(--accent-color);
  padding: 0.25em 0.6em;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 500;
  white-space: nowrap;
}

.event-tag a {
  color: inherit;
  text-decoration: none;
}

.event-tag a:hover {
  text-decoration: underline;
}

/* Map popup scrollable event list */
.location-event-list {
  list-style: none;
  margin: 1em 0 0 0;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1em;
}

.location-event-list .event-card {
  background: rgba(255, 255, 255, 0.5);
  padding: 1em;
  margin-bottom: 0.8em;
  border: 1px solid rgba(217, 211, 206, 0.5);
}

.location-event-list .event-card:last-child {
  margin-bottom: 0;
}

/* ── Processes section ─────────────────────────────────────────────────────── */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4em;
  margin-top: 1.5em;
}

.process-card {
  display: flex;
  gap: 1em;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2em;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.process-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  text-decoration: none;
}

.process-card__glyph {
  flex-shrink: 0;
  font-size: 2.6em;
  line-height: 1;
  width: 1.4em;
  height: 1.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  background: var(--light-bg);
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.process-card__glyph--none {
  font-size: 1.1em;
  color: var(--border-color);
}

.process-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.process-card__name {
  margin: 0;
  font-size: 1.15em;
  color: var(--primary-color);
}

.process-card__zodiac {
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--secondary-color);
  font-weight: 600;
}

.process-card__desc {
  font-size: 0.9em;
  color: #555;
  line-height: 1.6;
  margin: 0.35em 0 0.5em;
}

.process-card__more {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--accent-color);
  margin-top: auto;
}

/* Process essay page */
.process-page {
  max-width: 820px;
}

.process-page__header {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.process-page__header h2 {
  margin: 0;
  border: none;
}

.process-page__glyph {
  font-size: 1.8em;
  color: var(--secondary-color);
  line-height: 1;
}

.process-page__zodiac {
  font-size: 0.9em;
  color: #666;
  margin: 0.2em 0 1em;
}

.process-page__lead {
  font-size: 1.1em;
  line-height: 1.7;
  color: #333;
  border-left: 4px solid var(--secondary-color);
  padding-left: 1em;
  margin: 0.5em 0 1.2em;
}

.process-page__seealso {
  font-size: 0.95em;
  background: var(--light-bg);
  padding: 0.6em 1em;
  border-radius: 6px;
  margin-bottom: 1.5em;
}

.process-page__body {
  font-size: 1.02em;
  line-height: 1.8;
  color: #333;
}

.process-page__body h3 {
  margin-top: 1.4em;
  color: var(--primary-color);
}

.concept-process-link {
  font-size: 0.95em;
  background: var(--light-bg);
  padding: 0.6em 1em;
  border-radius: 6px;
  margin-top: 1.2em;
  border-left: 3px solid var(--secondary-color);
}

.process-page__draft-note {
  font-size: 0.85em;
  color: #8a7a5a;
  background: rgba(139, 111, 71, 0.08);
  padding: 0.5em 0.9em;
  border-radius: 4px;
}

/* Print styles */
@media print {
  header, nav, footer {
    display: none;
  }

  main {
    max-width: 100%;
  }

  section {
    page-break-inside: avoid;
  }

  a {
    color: #0066cc;
  }
}

/* --- enrichment: itinerary & connections (added 2026-06-29) --- */
.itinerary, .connections { margin-top: 1.5rem; }
.itinerary-list { padding-left: 1.4rem; }
.itinerary-list li { margin: 0.5rem 0; }
.itin-year { color: #6b5a3e; font-size: 0.9em; }
.itin-what { color: #444; font-size: 0.95em; }
.connections-list { list-style: none; padding-left: 0; }
.connections-list li { margin: 0.35rem 0; }
.rel-type { display:inline-block; min-width: 9.5em; font-variant: small-caps; color:#5a3c1d; font-weight:600; }
.evidence { font-size: 0.72em; text-transform: uppercase; letter-spacing:.04em; border:1px solid #bbb; border-radius:999px; padding:1px 7px; color:#666; margin-left:4px; }
.evidence-attested { border-color:#4a7; color:#2a6; }
.evidence-inferred { border-style: dashed; border-color:#c84; color:#a63; }
.evidence-approximate { border-style: dashed; border-color:#b94; color:#964; }
.draft-note { font-size:0.82em; color:#888; }
