:root {
  --lib-bg-parchment: #FAF7F2;
  --lib-bg-surface: #EFE9DC;
  --lib-bg-white: #FFFFFF;
  --lib-text-ink: #1C1917;
  --lib-text-muted: #5C5446;
  --lib-color-burgundy: #7B2D3E;
  --lib-color-burgundy-hover: #9B3D4E;
  --lib-color-accent-gold: #B8860B;
  --lib-font-display: 'Playfair Display', Georgia, serif;
  --lib-font-body: 'Lora', Georgia, serif;
  --lib-border-soft: 1px solid rgba(123, 45, 62, 0.15);
  --lib-border-gold: 1px solid rgba(184, 134, 11, 0.3);
  --lib-radius-sm: 4px;
  --lib-radius-lg: 12px;
  --lib-shadow-soft: 0 10px 30px rgba(28, 25, 23, 0.04);
}

/* Reset & Base HTML Elements */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--lib-bg-parchment);
  color: var(--lib-text-ink);
  font-family: var(--lib-font-body);
  font-size: 1.1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--lib-font-display);
  font-style: italic;
  font-weight: 600;
  line-height: 1.25;
  color: var(--lib-text-ink);
  margin-bottom: 1.25rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--lib-color-burgundy);
  text-decoration: none;
  transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover {
  color: var(--lib-color-burgundy-hover);
}

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

/* Common Layout Wrapper */
.lib-ateneum-envelope {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .lib-ateneum-envelope {
    padding: 0 1.25rem;
  }
}

/* Header Styles */
.lib-ateneum-header {
  background-color: var(--lib-bg-white);
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.lib-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.lib-ateneum-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--lib-font-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lib-color-burgundy);
}

.lib-ateneum-logo svg {
  fill: var(--lib-color-burgundy);
  width: 32px;
  height: 32px;
}

/* Navigation & Hamburger styling */
.lib-index-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.lib-index-menu a {
  font-family: var(--lib-font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--lib-text-muted);
  position: relative;
  padding: 0.25rem 0;
}

.lib-index-menu a:hover,
.lib-index-menu a.active {
  color: var(--lib-color-burgundy);
}

.lib-index-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--lib-color-burgundy);
  transition: width 0.3s ease;
}

.lib-index-menu a:hover::after,
.lib-index-menu a.active::after {
  width: 100%;
}

.lib-hamburger-toggle {
  display: none;
}

.lib-hamburger-label {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
}

.lib-hamburger-label span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--lib-text-ink);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .lib-hamburger-label {
    display: flex;
  }

  .lib-index-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--lib-bg-white);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transition: right 0.4s ease;
    padding: 2rem;
  }

  .lib-hamburger-toggle:checked ~ .lib-index-menu {
    right: 0;
  }

  .lib-hamburger-toggle:checked ~ .lib-hamburger-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .lib-hamburger-toggle:checked ~ .lib-hamburger-label span:nth-child(2) {
    opacity: 0;
  }

  .lib-hamburger-toggle:checked ~ .lib-hamburger-label span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

/* Announcement Row (Preset B details) */
.lib-news-ticker {
  background-color: var(--lib-color-burgundy);
  color: var(--lib-bg-parchment);
  padding: 0.65rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lib-news-ticker a {
  color: var(--lib-bg-parchment);
  text-decoration: underline;
  margin-left: 0.5rem;
}

/* Stage Main (Hero) - Split Screen (Preset B) */
.lib-portal-entry {
  display: flex;
  min-height: 80vh;
  background-color: var(--lib-bg-white);
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
}

.lib-portal-left {
  flex: 0 0 55%;
  padding: 6rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--lib-bg-parchment);
}

.lib-portal-right {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
}

.lib-portal-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.lib-portal-subtitle {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lib-color-accent-gold);
  margin-bottom: 1rem;
  font-weight: 600;
}

.lib-portal-action-line {
  margin-top: 2rem;
}

/* Custom Buttons (Non-banned naming) */
.lib-leaf-action {
  display: inline-block;
  padding: 1rem 2.25rem;
  font-family: var(--lib-font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid var(--lib-color-burgundy);
  background-color: transparent;
  color: var(--lib-color-burgundy);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: var(--lib-radius-sm);
}

.lib-leaf-action:hover {
  background-color: var(--lib-color-burgundy);
  color: var(--lib-bg-parchment);
}

.lib-leaf-action-accent {
  background-color: var(--lib-color-burgundy);
  color: var(--lib-bg-parchment);
}

.lib-leaf-action-accent:hover {
  background-color: var(--lib-color-burgundy-hover);
  border-color: var(--lib-color-burgundy-hover);
}

@media (max-width: 992px) {
  .lib-portal-entry {
    flex-direction: column;
  }
  .lib-portal-left, .lib-portal-right {
    flex: 0 0 100%;
  }
  .lib-portal-left {
    padding: 3.5rem 2rem;
  }
  .lib-portal-right {
    height: 350px;
  }
}

/* Chapter Segment (General Content Layout Block) */
.lib-chapter-segment {
  padding: 6rem 0;
}

.lib-chapter-segment-dark {
  background-color: var(--lib-bg-surface);
}

.lib-chapter-intro {
  max-width: 700px;
  margin: 0 auto 4rem auto;
  text-align: center;
}

/* Editorial 3-Column Text Block */
.lib-ateneum-editorial-columns {
  column-count: 3;
  column-gap: 3rem;
  column-rule: 1px dashed rgba(123, 45, 62, 0.15);
  margin-bottom: 4rem;
}

.lib-editorial-slice {
  break-inside: avoid;
  margin-bottom: 2rem;
}

.lib-editorial-slice h3 {
  color: var(--lib-color-burgundy);
  margin-bottom: 1rem;
}

.lib-editorial-slice svg {
  width: 28px;
  height: 28px;
  fill: var(--lib-color-accent-gold);
  margin-top: 1rem;
}

@media (max-width: 992px) {
  .lib-ateneum-editorial-columns {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .lib-ateneum-editorial-columns {
    column-count: 1;
    column-gap: 0;
    column-rule: none;
  }
}

.lib-full-illustration {
  width: 100%;
  height: 45vh;
  object-fit: cover;
  border-radius: var(--lib-radius-sm);
  margin-top: 2rem;
}

/* Masonry Feature Layout (Preset B) */
.lib-folio-masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

.lib-spine-slab {
  break-inside: avoid;
  background-color: var(--lib-bg-white);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: var(--lib-radius-sm);
  box-shadow: var(--lib-shadow-soft);
  border: var(--lib-border-soft);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.lib-spine-slab:hover {
  transform: translateY(-5px);
  border-color: var(--lib-color-accent-gold);
}

.lib-spine-slab-large {
  background-color: var(--lib-color-burgundy);
  color: var(--lib-bg-parchment);
}

.lib-spine-slab-large h3 {
  color: var(--lib-bg-parchment);
}

.lib-spine-slab-large p {
  color: rgba(250, 247, 242, 0.8);
}

.lib-spine-slab svg {
  width: 36px;
  height: 36px;
  fill: var(--lib-color-accent-gold);
  margin-bottom: 1.25rem;
}

.lib-spine-slab-large svg {
  fill: var(--lib-bg-parchment);
}

@media (max-width: 992px) {
  .lib-folio-masonry {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .lib-folio-masonry {
    column-count: 1;
  }
}

/* Schedule and Map horizontal track */
.lib-reading-track {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px dashed var(--lib-bg-surface);
}

.lib-track-station {
  flex: 1;
  position: relative;
}

.lib-track-station h4 {
  color: var(--lib-color-burgundy);
  margin-bottom: 0.5rem;
}

.lib-track-station svg {
  width: 24px;
  height: 24px;
  fill: var(--lib-color-accent-gold);
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .lib-reading-track {
    flex-direction: column;
    gap: 2.5rem;
  }
}

/* CTA Strip (Lexicon Incitement) */
.lib-lexicon-incitement {
  background-color: var(--lib-color-burgundy);
  color: var(--lib-bg-parchment);
  text-align: center;
  padding: 6rem 2rem;
  border-top: 3px double var(--lib-color-accent-gold);
}

.lib-lexicon-incitement h2 {
  color: var(--lib-bg-parchment);
  margin-bottom: 1.5rem;
}

.lib-lexicon-incitement p {
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  color: rgba(250, 247, 242, 0.85);
}

.lib-ghost-linkage {
  border-color: var(--lib-bg-parchment);
  color: var(--lib-bg-parchment);
}

.lib-ghost-linkage:hover {
  background-color: var(--lib-bg-parchment);
  color: var(--lib-color-burgundy);
}

/* Accordion for Expert Page */
.lib-accordion-rack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 3rem 0;
}

.lib-accordion-panel {
  background-color: var(--lib-bg-white);
  border: var(--lib-border-soft);
  border-radius: var(--lib-radius-sm);
  padding: 2rem;
}

.lib-accordion-panel h4 {
  color: var(--lib-color-burgundy);
  border-bottom: 1px solid var(--lib-bg-surface);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

/* Stats layout */
.lib-ateneum-stripe {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  text-align: center;
  margin: 4rem 0;
  padding: 3rem 2rem;
  background-color: var(--lib-bg-surface);
  border-radius: var(--lib-radius-lg);
}

.lib-ateneum-beam-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lib-stat-number {
  font-family: var(--lib-font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--lib-color-burgundy);
  line-height: 1;
}

.lib-stat-descr {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lib-text-muted);
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .lib-ateneum-stripe {
    flex-direction: column;
    gap: 3rem;
  }
}

/* Split Form/Info Layout for Reserve Page */
.lib-page-split {
  display: flex;
  gap: 4rem;
  margin-top: 3rem;
}

.lib-page-split-info {
  flex: 0 0 45%;
}

.lib-page-split-form {
  flex: 0 0 55%;
  background-color: var(--lib-bg-white);
  padding: 3.5rem;
  border-radius: var(--lib-radius-lg);
  box-shadow: var(--lib-shadow-soft);
  border: var(--lib-border-soft);
}

@media (max-width: 992px) {
  .lib-page-split {
    flex-direction: column;
    gap: 3rem;
  }
  .lib-page-split-info, .lib-page-split-form {
    flex: 0 0 100%;
  }
}

.lib-form-field {
  margin-bottom: 1.5rem;
}

.lib-form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--lib-text-muted);
}

.lib-form-field input[type="text"],
.lib-form-field input[type="email"],
.lib-form-field textarea {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-family: var(--lib-font-body);
  font-size: 1rem;
  color: var(--lib-text-ink);
  background-color: var(--lib-bg-parchment);
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: var(--lib-radius-sm);
  transition: border-color 0.3s ease;
}

.lib-form-field input:focus,
.lib-form-field textarea:focus {
  outline: none;
  border-color: var(--lib-color-burgundy);
}

.lib-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.lib-form-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--lib-color-burgundy);
}

.lib-form-checkbox label {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--lib-text-muted);
}

.lib-disclaimer-text {
  font-size: 0.8rem;
  color: var(--lib-text-muted);
  margin-top: 1.5rem;
  border-top: 1px solid var(--lib-bg-surface);
  padding-top: 1rem;
}

/* Thank you page illustration */
.lib-thank-plate {
  text-align: center;
  max-width: 600px;
  margin: 4rem auto;
}

.lib-thank-illustration {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--lib-radius-lg);
  margin: 2.5rem 0;
  border: var(--lib-border-soft);
}

/* Footer Section */
.lib-ateneum-footer {
  background-color: var(--lib-bg-surface);
  border-top: 1px solid rgba(28, 25, 23, 0.08);
  padding: 5rem 0 3rem 0;
}

.lib-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 3rem;
}

.lib-footer-links {
  display: flex;
  gap: 3rem;
}

.lib-footer-column h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lib-text-muted);
  margin-bottom: 1.5rem;
}

.lib-footer-column ul {
  list-style: none;
}

.lib-footer-column ul li {
  margin-bottom: 0.75rem;
}

.lib-footer-column ul li a {
  font-size: 0.95rem;
  color: var(--lib-text-ink);
}

.lib-footer-column ul li a:hover {
  color: var(--lib-color-burgundy);
}

.lib-footer-bottom {
  border-top: 1px solid rgba(28, 25, 23, 0.1);
  padding-top: 2rem;
  text-align: center;
}

.lib-footer-disclaimer {
  font-size: 0.85rem;
  color: var(--lib-text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.lib-footer-copyright {
  font-size: 0.85rem;
  color: var(--lib-text-muted);
}

@media (max-width: 768px) {
  .lib-footer-top {
    flex-direction: column;
  }
  .lib-footer-links {
    flex-direction: column;
    gap: 2rem;
  }
}

/* Cookies Consent Bar */
.lib-cookie-sentinel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--lib-bg-white);
  border-top: 2px solid var(--lib-color-burgundy);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
  padding: 1.5rem 2rem;
  z-index: 9999;
  display: none;
}

.lib-cookie-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.lib-cookie-wrap p {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--lib-text-ink);
}

.lib-cookie-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.lib-cookie-btn {
  padding: 0.65rem 1.5rem;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .lib-cookie-wrap {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}