/**
 * ΠΡΟΣΦΥΓΙΚΟ ΣΩΜΑΤΕΙΟ ΛΙΜΝΙΩΝ «ΝΙΚΟΔΗΜΟΣ ΜΥΛΩΝΑΣ»
 * Σύστημα σχεδίασης & Σύγχρονο CSS (Modern Design System)
 */

/* ==========================================================================
   1. Design Tokens & Variables
   ========================================================================== */
:root {
  /* Mediterranean Navy & Brand Palette */
  --navy-950: #080c1d;
  --navy-900: #0f1638;
  --navy-800: #172254;
  --navy-700: #202f72;
  --navy-600: #2c3996;
  --navy-500: #3f4fb8;
  --navy-400: #6272d1;
  --navy-200: #c6d0f7;
  --navy-100: #e8ecfa;
  --navy-50:  #f3f6fe;

  /* Terracotta & Cyprus Ochre / Gold Accents */
  --terra-700: #963a15;
  --terra-600: #b54a22;
  --terra-500: #cc5a2e;
  --terra-400: #e37449;
  --terra-100: #faebe4;
  --terra-50:  #fef6f2;

  --gold-600:  #b87928;
  --gold-500:  #d49137;
  --gold-400:  #ebb05e;
  --gold-100:  #fcf1e0;
  --gold-50:   #fefaf3;

  /* Canvas & Warm Limestone / Sand Surfaces */
  --bg-canvas:   #fbf9f5;
  --bg-subtle:   #f4efe5;
  --bg-card:     #ffffff;
  --bg-elevated: #ffffff;
  
  --line:        #e5dfd2;
  --line-strong: #cfc6b5;
  --border:      rgba(15, 22, 56, 0.08);

  /* Typography Colors */
  --text-main:   #131728;
  --text-muted:  #535973;
  --text-faint:  #878da6;
  --text-white:  #ffffff;

  /* Fonts */
  --font-sans:  "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Playfair Display", "GFS Didot", "Noto Serif", Georgia, serif;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 22, 56, 0.04);
  --shadow-sm: 0 2px 6px -1px rgba(15, 22, 56, 0.06), 0 1px 3px rgba(15, 22, 56, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 22, 56, 0.08), 0 3px 10px -2px rgba(15, 22, 56, 0.04);
  --shadow-lg: 0 18px 44px -8px rgba(15, 22, 56, 0.12), 0 6px 18px -4px rgba(15, 22, 56, 0.06);
  --shadow-xl: 0 24px 64px -12px rgba(15, 22, 56, 0.2);

  /* Radii */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;
}

/* ==========================================================================
   2. Reset & Global Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--navy-600);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--terra-500);
}

:focus-visible {
  outline: 3px solid var(--terra-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.sr-skip {
  position: absolute;
  left: -9999px;
  top: 16px;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}

.sr-skip:focus {
  left: 16px;
}

.wrap {
  width: min(1220px, 100% - 40px);
  margin-inline: auto;
}

/* Scroll reading progress bar at top */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-500), var(--terra-500), var(--navy-500));
  z-index: 100;
  transition: width 0.08s ease-out;
}

/* ==========================================================================
   3. Header & Navigation (Glassmorphic)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 249, 245, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 22, 56, 0.05);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(251, 249, 245, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px -2px rgba(15, 22, 56, 0.06);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy-900);
  margin-right: auto;
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(15, 22, 56, 0.1);
  flex-shrink: 0;
}

.brand div {
  display: flex;
  flex-direction: column;
}

.brand span {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.brand strong {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--navy-950);
  letter-spacing: 0.01em;
}

.quick {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.quick a:hover {
  background: var(--navy-100);
  color: var(--navy-600);
}

.quick a[aria-current="page"] {
  background: var(--navy-600);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Quick link to the Genealogical Tree */
.btn-tree-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--navy-50);
  border: 1px solid var(--navy-200);
  color: var(--navy-700);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-tree-nav:hover {
  background: var(--navy-600);
  border-color: var(--navy-600);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 57, 150, 0.25);
}

.btn-tree-nav svg {
  color: currentColor;
}

/* Menu Toggle Button */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: var(--navy-900);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-btn:hover {
  background: var(--navy-700);
  transform: translateY(-1px);
}

.menu-btn .bars {
  width: 16px;
  height: 12px;
  position: relative;
  display: block;
}

.menu-btn .bars::before,
.menu-btn .bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, top 0.25s ease;
}

.menu-btn .bars::before { top: 1px; }
.menu-btn .bars::after  { top: 9px; }

.nav-mobile {
  display: none;
}

/* Grouped navigation */
[hidden] {
  display: none !important;
}

.dialog-open {
  overflow: hidden;
}

html:has(> body.dialog-open) {
  background-color: var(--navy-950);
}

.mega {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--navy-950);
  color: #fff;
  color-scheme: dark;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-gutter: stable both-edges;
  scroll-padding-block-start: 5.5rem;
}

.mega::backdrop, .lightbox::backdrop {
  background: rgba(8, 12, 29, 0.85);
}

.mega-container {
  padding-bottom: 24px;
}

.mega-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 20px 12px;
  background: var(--navy-950);
}

.mega-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.2;
}

.menu-close {
  flex-shrink: 0;
  min-height: 44px;
}

.mega-search-wrap {
  max-width: 600px;
  margin: 8px 0 20px;
}

.mega-search-wrap label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 18px;
  color: var(--gold-400);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(212, 145, 55, 0.2);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.search-hint {
  margin: 8px 0 0;
  color: var(--gold-400);
}

.search-hint:empty {
  margin: 0;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.mega-col {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
}

.mega-col h3 {
  margin: 0 0 8px;
  color: var(--gold-400);
  font-size: 1rem;
}

.mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-entry ul {
  margin: 0 0 4px 10px;
  padding-left: 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.18);
}

.mega-entry a {
  display: block;
  padding: 7px 4px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.mega-page a {
  font-weight: 700;
  color: #fff;
}

.mega-entry a:hover, .mega-entry a[aria-current="page"] {
  color: var(--gold-400);
  text-decoration: underline;
}

/* ==========================================================================
   5. Hero Section (High Impact)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 80% -10%, rgba(63, 79, 184, 0.45) 0%, transparent 65%),
    linear-gradient(155deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: #ffffff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 50px;
  align-items: center;
  padding: 100px 0 120px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-400);
  font-weight: 700;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 10px var(--gold-400);
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 7.5vw, 6rem);
  line-height: 0.96;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.hero-sub {
  display: block;
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 0.44em;
  color: var(--gold-400);
  letter-spacing: 0.02em;
  margin-top: 14px;
  line-height: 1.25;
}

.hero p.lead {
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 38em;
  color: rgba(255, 255, 255, 0.84);
  margin: 0 0 36px;
  font-weight: 400;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-frame {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-logo-frame::before {
  content: "";
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 145, 55, 0.25) 0%, transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.hero-logo {
  width: min(340px, 85%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
  padding: 16px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 8px rgba(255, 255, 255, 0.12),
    0 0 0 20px rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-logo:hover {
  transform: scale(1.03) rotate(1deg);
  box-shadow:
    0 32px 70px rgba(0, 0, 0, 0.55),
    0 0 0 10px rgba(255, 255, 255, 0.18),
    0 0 0 24px rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   6. Buttons & Interactive Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  border: 0;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #ffffff;
  color: var(--navy-900);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: #ffffff;
  color: var(--terra-600);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
}

.btn-tree-hero {
  background: linear-gradient(135deg, var(--gold-400), var(--terra-400));
  color: var(--navy-950);
  box-shadow: 0 4px 20px rgba(212, 145, 55, 0.35);
}

.btn-tree-hero:hover {
  color: var(--navy-950);
  box-shadow: 0 8px 28px rgba(212, 145, 55, 0.55);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.btn-blue {
  background: var(--navy-600);
  color: #ffffff;
}

.btn-blue:hover {
  background: var(--navy-800);
  color: #ffffff;
}

/* ==========================================================================
   7. Metric Stats Bar
   ========================================================================== */
.stats-wrap {
  position: relative;
  z-index: 10;
  margin-top: -56px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.stat {
  padding: 30px 28px 26px;
  border-left: 1px solid var(--line);
  position: relative;
  transition: transform 0.25s ease, background 0.25s ease;
}

.stat:first-child {
  border-left: 0;
}

.stat:hover {
  background: var(--bg-subtle);
}

.stat-top {
  margin-bottom: 10px;
}

.stat-pill {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--navy-600);
  background: var(--navy-100);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.stat-pill.accent {
  color: var(--terra-600);
  background: var(--terra-100);
}

.stat b {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 2.75rem;
  line-height: 1;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

.stat small {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   8. Standard Sections & Intros
   ========================================================================== */
.section {
  padding: 96px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-400);
  font-weight: 800;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

.eyebrow.dark {
  color: var(--terra-500);
}

.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  margin: 10px 0 0;
  color: var(--navy-950);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.pull {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  line-height: 1.4;
  color: var(--navy-900);
  margin: 0;
}

/* ==========================================================================
   9. Dedicated Spotlight: Genealogical Tree Banner
   ========================================================================== */
.tree-spotlight-section {
  padding: 40px 0 80px;
}

.tree-spotlight-card {
  background:
    radial-gradient(circle at 10% 20%, rgba(212, 145, 55, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(63, 79, 184, 0.25) 0%, transparent 50%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 60%, var(--navy-800) 100%);
  border-radius: var(--radius-xl);
  color: #ffffff;
  padding: 56px 64px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.tree-spotlight-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 48px;
  align-items: center;
}

.spotlight-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(212, 145, 55, 0.2);
  border: 1px solid rgba(212, 145, 55, 0.4);
  border-radius: var(--radius-full);
  color: var(--gold-400);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.tree-spotlight-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 18px;
  color: #ffffff;
}

.tree-spotlight-text p {
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 28px;
  max-width: 38em;
}

.tree-features-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}

.tf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
}

.tf-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-400);
  color: var(--navy-950);
  font-size: 0.75rem;
  font-weight: 800;
}

.btn-tree-cta {
  background: #ffffff;
  color: var(--navy-900);
  font-size: 1.0625rem;
  padding: 16px 28px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.btn-tree-cta:hover {
  background: var(--gold-400);
  color: var(--navy-950);
  transform: translateY(-2px);
}

/* Interactive Mock Tree Diagram */
.mock-tree-visual {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  position: relative;
}

.mock-tree-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  margin-bottom: 20px;
}

.mock-tree-nodes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mock-tree-node {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  backdrop-filter: blur(8px);
}

.mock-tree-node.root {
  background: rgba(212, 145, 55, 0.25);
  border-color: var(--gold-400);
}

.mock-tree-node.leaf {
  background: rgba(63, 79, 184, 0.35);
  border-color: var(--navy-400);
}

.mock-tree-branch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.mock-tree-connector-v {
  width: 2px;
  height: 16px;
  background: rgba(255, 255, 255, 0.25);
}

.mock-tree-node .m-date {
  font-size: 0.75rem;
  color: var(--gold-400);
  font-weight: 700;
  margin-left: 4px;
}

/* ==========================================================================
   10. Category Cards Grid
   ========================================================================== */
.band {
  background: var(--navy-950);
  color: #ffffff;
}

.band h2 {
  color: #ffffff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  min-height: 200px;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  color: var(--text-main);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-icon {
  font-size: 1.5rem;
}

.card .num {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--terra-500);
  font-weight: 800;
}

.card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--navy-950);
  line-height: 1.2;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.card .arrow {
  margin-top: auto;
  padding-top: 20px;
  color: var(--navy-600);
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.card:hover .arrow {
  gap: 10px;
  color: var(--terra-500);
}

/* Dark mode cards in .band */
.dark-cards .card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.dark-cards .card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.dark-cards .card h3 {
  color: #ffffff;
}

.dark-cards .card p {
  color: rgba(255, 255, 255, 0.7);
}

.dark-cards .card .num,
.dark-cards .card .arrow {
  color: var(--gold-400);
}

/* ==========================================================================
   11. Inner Page Layout (Hero, Breadcrumbs, Sticky TOC)
   ========================================================================== */
.page-hero {
  background:
    radial-gradient(ellipse 800px 300px at 90% 0%, rgba(63, 79, 184, 0.35) 0%, transparent 60%),
    linear-gradient(155deg, var(--navy-950) 0%, var(--navy-900) 65%, var(--navy-800) 100%);
  color: #ffffff;
  padding: 76px 0 68px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.crumbs {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crumbs a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
}

.crumbs a:hover {
  color: var(--gold-400);
}

.crumb-sep {
  opacity: 0.4;
}

.crumb-current {
  color: var(--gold-400);
  font-weight: 600;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 16px;
  color: #ffffff;
}

.page-intro {
  max-width: 44em;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.65;
}

.windmill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.windmill-actions a {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--gold-400);
  border-radius: var(--radius-sm);
  color: var(--gold-400);
  font-weight: 700;
  text-decoration: none;
}

.windmill-actions a:first-child,
.windmill-actions a:hover {
  background: var(--gold-400);
  color: var(--navy-950);
}

.windmill-actions a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.windmill-illustration {
  margin: 0 0 24px;
}

.windmill-illustration img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.windmill-illustration figcaption {
  padding-top: 8px;
  color: var(--text-muted);
  font-size: .875rem;
}

.content .windmill-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.content .windmill-steps li {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.windmill-steps strong {
  display: block;
  color: var(--navy-950);
}

.windmill-steps span {
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 700;
}

/* Article grid with sticky TOC */
.article-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 60px;
  padding: 64px 0 96px;
}

.toc {
  position: sticky;
  top: 104px;
  align-self: start;
}

.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.toc .toc-title {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
  margin: 0 0 14px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.18s ease;
}

.toc a:hover {
  color: var(--navy-900);
  background: var(--bg-subtle);
}

.toc a[aria-current="location"] {
  color: var(--navy-600);
  background: var(--navy-100);
  font-weight: 700;
}

/* Content typography */
.content > section, #polignosi-photos, #photos-2016 {
  scroll-margin-top: 110px;
}

.content > section {
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.content > section:last-of-type {
  border-bottom: 0;
}

.content h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1.15;
  color: var(--navy-950);
  margin: 0 0 20px;
}

.content h3 {
  font-size: 1.25rem;
  margin: 32px 0 10px;
  color: var(--navy-900);
  font-weight: 700;
}

.content p, .content li {
  max-width: 44em;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.nickname-search {
  display: grid;
  gap: 8px;
  max-width: 28rem;
  margin: 24px 0 12px;
}

.nickname-search label {
  color: var(--navy-900);
  font-weight: 700;
}

.nickname-search input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #8e8895;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  font: inherit;
}

.nickname-search input:focus-visible,
.nickname-group summary:focus-visible {
  outline: 2px solid var(--navy-600);
  outline-offset: 2px;
}

.content .nickname-status {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.nickname-list {
  display: grid;
  gap: 8px;
}

.nickname-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.nickname-group summary {
  padding: 10px 16px;
  border-radius: inherit;
  color: var(--navy-900);
  font-weight: 700;
  cursor: pointer;
}

.nickname-group summary:hover,
.nickname-group[open] summary {
  background: var(--bg-subtle);
}

.nickname-group ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 8px 24px;
  padding: 16px;
  margin: 0;
  list-style: none;
}

.content blockquote {
  margin: 28px 0;
  padding: 12px 24px;
  border-left: 4px solid var(--terra-500);
  background: var(--bg-card);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--navy-900);
  box-shadow: var(--shadow-xs);
}

.content blockquote cite {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: normal;
  margin-top: 8px;
}

sup.src a {
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--terra-600);
  font-weight: 700;
  padding: 0 2px;
}

/* Facts Cards */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 16px;
  margin: 24px 0 12px;
  padding: 0;
  list-style: none;
}

.facts li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}

.facts b {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 28px 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 92px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 12px 0;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 87px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--navy-600);
  box-shadow: 0 0 0 3px var(--navy-100);
}

.timeline time {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy-600);
  text-align: right;
  line-height: 1.5;
}

/* Pending Notice Card */
.pending {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(44, 57, 150, 0.03) 12px 24px), var(--bg-card);
  border: 1.5px dashed var(--navy-200);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  color: var(--text-muted);
  margin: 20px 0;
}

.pending .ico {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-600);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.pending strong {
  display: block;
  color: var(--navy-950);
  font-size: 1.0625rem;
  margin-bottom: 4px;
}

.pending p {
  margin: 0;
  font-size: 0.9375rem;
}

/* ==========================================================================
   12. Photos, Galleries & Media
   ========================================================================== */
.photo {
  margin: 24px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.photo:hover {
  box-shadow: var(--shadow-md);
}

.photo a {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--navy-950);
}

.photo img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.photo a:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}

.photo-zoom-icon {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 22, 56, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.photo a:hover .photo-zoom-icon {
  opacity: 1;
  transform: none;
}

.photo figcaption {
  padding: 14px 18px 16px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.photo .credit {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.photo.float {
  float: right;
  width: min(320px, 45%);
  margin: 4px 0 20px 32px;
}

/* Photo Grid */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin: 24px 0 32px;
}

.photos .photo {
  margin: 0;
}

.photos .photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Gallery Controls & Tabs */
.gallery-controls {
  margin-bottom: 32px;
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.gallery-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-tab:hover {
  background: var(--navy-100);
  color: var(--navy-600);
}

.gallery-tab[aria-pressed="true"] {
  background: var(--navy-600);
  border-color: var(--navy-600);
  color: #fff;
}

/* Videos */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  margin: 24px 0 32px;
}

.video {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.yt, .video iframe, .video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  background: #000;
}

.yt {
  position: relative;
  cursor: pointer;
}

.yt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.yt:hover img {
  opacity: 1;
  transform: scale(1.03);
}

.yt .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--navy-600);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease, transform 0.2s ease;
}

.yt .play::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 20px;
  border-style: solid;
  border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #fff;
}

.yt:hover .play {
  background: var(--terra-500);
  transform: scale(1.08);
}

.video figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 18px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--navy-900);
  font-weight: 600;
}

.video .yr, .video .video-kind {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--terra-500);
}

.video figcaption a {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ==========================================================================
   13. Interactive Lightbox Modal
   ========================================================================== */
.lightbox {
  width: min(960px, 100% - 24px);
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overscroll-behavior: contain;
}

.lightbox-dialog {
  position: relative;
}

.lightbox-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--navy-950);
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover {
  transform: scale(1.08);
  background: var(--gold-400);
}

.lightbox-figure {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.lightbox-img-wrap {
  background: #000000;
  max-height: 60dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.lightbox-img {
  max-height: 60dvh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.lightbox-info {
  padding: 18px 24px;
  background: var(--bg-card);
}

.lightbox-caption {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-950);
  line-height: 1.45;
}

.lightbox-credit {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ==========================================================================
   14. Forms & Interactive Submissions
   ========================================================================== */
.form {
  display: grid;
  gap: 18px;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form label {
  display: grid;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy-900);
}

.form input, .form textarea, .form select {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  width: 100%;
  border: 1px solid #8e8895;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input:focus, .form textarea:focus {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px var(--navy-100);
}

.form .note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.form-msg:not(:empty) {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--navy-100);
  color: var(--navy-800);
}

.form-msg:empty {
  margin-top: -18px;
}

.form-msg.error {
  background: var(--terra-100);
  color: var(--terra-700);
}

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   15. Table & Population SVG Chart
   ========================================================================== */
table.data {
  width: 100%;
  max-width: 680px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 20px 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

table.data th, table.data td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

table.data th:first-child, table.data td:first-child {
  text-align: left;
}

table.data thead th {
  background: var(--bg-subtle);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

table.data tbody tr:hover {
  background: var(--bg-subtle);
}

.chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 16px;
  margin: 24px 0;
  max-width: 800px;
  box-shadow: var(--shadow-sm);
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Sources section */
.sources {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-xs);
  margin-top: 48px;
}

.sources h2 {
  font-family: var(--font-sans) !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  margin: 0 0 12px !important;
  font-weight: 800;
}

.sources ol {
  margin: 0;
  padding-left: 22px;
}

.sources li {
  margin: 6px 0;
  max-width: none;
}

/* ==========================================================================
   16. Footer & Back-to-Top Button
   ========================================================================== */
.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.7);
  padding: 72px 0 32px;
  font-size: 0.9375rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.75fr;
  gap: 56px;
}

.foot-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.foot-brand img {
  width: 68px;
  height: 68px;
  background: #ffffff;
  border-radius: 50%;
  padding: 4px;
}

.foot-brand strong {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: #ffffff;
  display: block;
  line-height: 1.2;
}

.foot-brand .est {
  display: block;
  font-size: 0.8125rem;
  color: var(--gold-400);
  font-weight: 600;
  margin-top: 4px;
}

.foot-desc {
  margin: 18px 0 24px;
  max-width: 32em;
  line-height: 1.6;
}

.foot-tree-badge {
  display: inline-block;
}

.foot-tree-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.foot-tree-link:hover {
  background: var(--navy-600);
  color: #ffffff;
  border-color: var(--navy-600);
}

.foot-heading {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  font-weight: 800;
  margin: 0 0 20px;
}

.foot-links {
  columns: 3 160px;
  column-gap: 32px;
}

.foot-links a {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 4px 0;
  break-inside: avoid;
  transition: color 0.18s ease, transform 0.18s ease;
}

.foot-links a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 56px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
}

.foot-tag {
  color: var(--gold-400);
  font-weight: 700;
}

/* Floating Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 50;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover {
  background: var(--navy-600);
  transform: translateY(-2px);
}

/* Keyboard targets and responsive layout */
#main {
  scroll-margin-top: 104px;
}

.article-single {
  grid-template-columns: minmax(0, 1fr);
}

.content p a, .content li a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.lightbox-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.lightbox-controls button {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--navy-50);
  color: var(--navy-900);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1040px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile {
    display: block;
    border-top: 1px solid var(--line);
  }
  .nav-mobile ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin-block: 0;
    padding: 0;
  }
  .nav-mobile a {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 2px 8px;
    color: var(--navy-900);
    font-size: 0.875rem;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
  }
  .nav-mobile a:hover, .nav-mobile a[aria-current="page"] {
    color: var(--navy-600);
    text-decoration: underline;
    text-underline-offset: 0.25em;
  }
  #main, .content > section, #polignosi-photos, #photos-2016 {
    scroll-margin-top: 138px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 70px 0 100px;
  }
  .hero-media {
    justify-content: flex-start;
  }
  .hero-logo {
    width: 180px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat:nth-child(3) {
    border-left: 0;
  }
  .stat:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }
  .tree-spotlight-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-top: 36px;
  }
  .toc {
    position: static;
  }
  .toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .toc a {
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.875rem;
    background: var(--bg-card);
  }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 860px) {
  .mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }
  .header-row {
    min-height: 64px;
    height: auto;
    gap: 8px;
    padding-block: 8px;
  }
  .header-actions {
    gap: 6px;
  }
  .brand {
    gap: 7px;
  }
  .brand span {
    font-size: 0.55rem;
    letter-spacing: 0.04em;
  }
  .menu-btn {
    min-height: 44px;
    padding-inline: 11px;
    gap: 6px;
  }
  .menu-btn .bars {
    flex-shrink: 0;
  }
  .mega-container {
    width: calc(100% - 24px);
    padding-bottom: 16px;
  }
  .mega-heading {
    padding-block: 12px 8px;
  }
  .mega-heading h2 {
    font-size: 1.25rem;
  }
  .mega-search-wrap {
    margin-bottom: 16px;
  }
  .mega .search-box svg {
    left: 12px;
  }
  .mega .search-box input {
    padding-inline: 40px 12px;
    font-size: 1rem;
  }
  .mega-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-grid {
    gap: 28px;
    padding: 38px 0 70px;
  }
  .hero-media {
    display: none;
  }
  .hero p.lead {
    font-size: 1.0625rem;
    margin-bottom: 24px;
  }
  .hero-badge {
    margin-bottom: 16px;
  }
  .hero h1 {
    font-size: clamp(2.7rem, 10vw, 4rem);
    margin-bottom: 16px;
  }
  .page-hero {
    padding: 32px 0;
  }
  .page-hero h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }
  .content h2 {
    font-size: 1.75rem;
  }
  table.data th, table.data td {
    padding: 8px 4px;
  }
  table.data {
    table-layout: fixed;
  }
  table.data thead th {
    letter-spacing: normal;
    text-transform: none;
    overflow-wrap: anywhere;
  }
  table.data thead th:first-child {
    width: 16%;
  }
  .brand img {
    width: 40px;
    height: 40px;
  }
  .brand strong {
    font-size: clamp(0.875rem, 3vw, 1.15rem);
  }
  .btn-tree-nav span {
    display: none;
  }
  .btn-tree-nav {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px;
  }
  .section {
    padding: 64px 0;
  }
  .stats-wrap {
    margin-top: -36px;
  }
  .stat {
    padding: 20px 18px;
  }
  .stat b {
    font-size: 2.2rem;
  }
  .tree-spotlight-card {
    padding: 36px 24px;
  }
  .form {
    padding: 22px 18px;
  }
  .form .row {
    grid-template-columns: 1fr;
  }
  .photo.float {
    float: none;
    width: 100%;
    margin: 20px 0;
  }
  .timeline::before {
    left: 64px;
  }
  .timeline li {
    grid-template-columns: 54px 1fr;
    gap: 22px;
  }
  .timeline li::before {
    left: 59px;
  }
  .timeline time {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   17. Εικονίδια, κάρτες ενοτήτων και πλοήγηση (ανανέωση 2026)
   ========================================================================== */
.i {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.18em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn .i, .quick .i, .crumbs .i, .eyebrow .i, .hero-badge .i { width: 1em; height: 1em; }
.eyebrow .i, .hero-badge .i { margin-right: 2px; }
.eyebrow.dark::before, .band .eyebrow::before { display: none; }
.hero-badge .badge-dot { display: none; }
.hero-badge span { display: inline-flex; align-items: center; gap: 8px; }

/* Header quick links */
.quick a { gap: 7px; }
.quick a .i { opacity: 0.75; }
.quick a[aria-current="page"] .i { opacity: 1; }
.btn-tree-nav .i { width: 16px; height: 16px; }

/* Mega menu entries */
.mega-page a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mega-page a .i {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 9px;
  background: rgba(235, 176, 94, 0.14);
  color: var(--gold-400);
}
.mega-entry ul { margin-left: 24px; }

/* Breadcrumbs */
.crumbs a { display: inline-flex; align-items: center; gap: 6px; }

/* Inner page hero with icon */
.page-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.page-hero-ico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(235, 176, 94, 0.22), rgba(63, 79, 184, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--gold-400);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.45);
  transform: rotate(-4deg);
}
.page-hero-ico .i { width: 60px; height: 60px; stroke-width: 1.4; }

/* Content sections as separated cards */
.content > section.block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px 30px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: flow-root;
}
.content > section.block:last-of-type { border-bottom: 1px solid var(--border); }

.block-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.block-ico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--navy-50), var(--navy-100));
  color: var(--navy-600);
  border: 1px solid var(--navy-200);
}
.block-ico .i { width: 26px; height: 26px; }
.block-num {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: var(--terra-500);
  line-height: 1;
  margin-bottom: 6px;
}
.content .block-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.content .block > :last-child { margin-bottom: 0; }
.content .block h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.content .block h3::before {
  content: "";
  width: 6px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(var(--gold-400), var(--terra-500));
  flex-shrink: 0;
}
.content .block .pending { background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(44, 57, 150, 0.03) 12px 24px), var(--bg-canvas); }
.content .block .facts li, .content .block table.data, .content .block .chart { background: var(--bg-canvas); }

/* TOC numbering */
.toc .toc-title { display: flex; align-items: center; gap: 8px; }
.toc a { display: flex; gap: 10px; align-items: baseline; }
.toc-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--terra-500);
  font-variant-numeric: tabular-nums;
}
.toc a[aria-current="location"] .toc-num { color: var(--navy-600); }

/* Fact cards with icons */
.facts b {
  display: flex;
  align-items: center;
  gap: 7px;
}
.facts b .i {
  width: 16px;
  height: 16px;
  color: var(--terra-500);
}

/* Pending notice */
.pending .ico .i { width: 20px; height: 20px; }
.photo-missing .ph {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
  color: var(--text-faint);
}
.photo-missing .ph .i { width: 48px; height: 48px; }

/* Sources */
.sources h2 { display: flex; align-items: center; gap: 8px; }
.sources h2 .i { width: 16px; height: 16px; color: var(--terra-500); }
.sources { margin-top: 12px; }

/* Previous / next */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.pager-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--navy-900);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pager-link:hover {
  color: var(--navy-600);
  border-color: var(--navy-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pager-link span { display: grid; line-height: 1.3; }
.pager-link small {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}
.pager-link .i { width: 22px; height: 22px; color: var(--terra-500); }
.pager-link.next { grid-column: 2; justify-content: flex-end; text-align: right; }

/* Home: stats */
.stat-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.stat-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--navy-100);
  color: var(--navy-600);
}
.stat-ico.accent { background: var(--terra-100); color: var(--terra-600); }
.stat-ico .i { width: 19px; height: 19px; }

/* Home: tree spotlight */
.tf-check .i { width: 13px; height: 13px; stroke-width: 3; }
.mock-tree-node .m-icon { display: inline-grid; color: var(--gold-400); }
.mock-tree-node .m-icon .i { width: 18px; height: 18px; }

/* Home: grouped explore cards */
.explore-group + .explore-group { margin-top: 56px; }
.explore-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.explore-ico {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: rgba(235, 176, 94, 0.15);
  color: var(--gold-400);
  flex-shrink: 0;
}
.explore-ico .i { width: 24px; height: 24px; }
.explore-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.6rem;
  color: #fff;
  line-height: 1.2;
}
.explore-head p { margin: 2px 0 0; color: rgba(255, 255, 255, 0.65); font-size: 0.9375rem; }
.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--navy-100);
  color: var(--navy-600);
  font-size: 1rem;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.card-icon .i { width: 24px; height: 24px; }
.dark-cards .card-icon { background: rgba(255, 255, 255, 0.08); color: var(--gold-400); }
.card:hover .card-icon { transform: scale(1.06) rotate(-4deg); background: var(--gold-400); color: var(--navy-950); }
.card h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0 8px;
  color: var(--navy-950);
  line-height: 1.2;
}
.dark-cards .card h4 { color: #fff; }
.card { min-height: 0; }
.card .arrow .i { width: 14px; height: 14px; }

/* Call to action band above the footer */
.cta-band {
  background: linear-gradient(120deg, var(--terra-600), var(--gold-500));
  color: #fff;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 44px 0;
  flex-wrap: wrap;
}
.cta-text { display: flex; align-items: center; gap: 20px; max-width: 46rem; }
.cta-ico {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}
.cta-ico .i { width: 28px; height: 28px; }
.cta-band h2 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.2;
}
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.92); }
.cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-gold { background: #fff; color: var(--terra-700); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); }
.btn-gold:hover { color: var(--navy-900); }
.btn-outline-light { color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.75); background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

/* Footer sitemap columns */
.foot-sitemap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.18s ease, transform 0.18s ease;
}
.foot-col a .i { width: 16px; height: 16px; color: var(--gold-400); opacity: 0.8; }
.foot-col a:hover { color: #fff; transform: translateX(2px); }
.foot-tree-link .i:last-child { width: 14px; height: 14px; }

/* Lightbox controls */
.lightbox-controls { align-items: center; }
.lightbox-controls button { display: inline-flex; align-items: center; gap: 6px; }
.lightbox-count { color: var(--text-muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; margin-inline: auto; }

/* Touch screens: always show the zoom hint on photos */
@media (hover: none) {
  .photo-zoom-icon { opacity: 1; transform: none; }
}

@media (max-width: 1040px) {
  .nav-mobile a { display: flex; flex-direction: column; gap: 2px; }
  .nav-mobile a .i { width: 18px; height: 18px; }
  .page-hero-ico { width: 96px; height: 96px; border-radius: 26px; }
  .page-hero-ico .i { width: 46px; height: 46px; }
}

@media (max-width: 640px) {
  .page-hero-ico { display: none; }
  .content > section.block { padding: 24px 18px 20px; border-radius: var(--radius-md); margin-bottom: 18px; }
  .block-head { gap: 12px; margin-bottom: 16px; padding-bottom: 14px; }
  .block-ico { width: 42px; height: 42px; border-radius: 12px; }
  .block-ico .i { width: 21px; height: 21px; }
  .content .block-head h2 { font-size: 1.5rem; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-link.next { grid-column: auto; }
  .foot-sitemap { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cta-text { align-items: flex-start; }
  .cta-ico { width: 48px; height: 48px; }
  .cta-btns, .cta-btns .btn { width: 100%; justify-content: center; }
  .tree-spotlight-preview { display: none; }
  .explore-head h3 { font-size: 1.35rem; }
  .stat { padding: 18px 14px; }
  .stat-ico { width: 30px; height: 30px; border-radius: 9px; }
  .stat-pill { letter-spacing: 0.08em; }
  .stat b { font-size: 1.9rem; }
}
