/* ═══════════════════════════════════════════════════════════
   DEBTWATCH HELLAS — Lorenz 2 Design System
   Rule of Law 2026 Mini-Site
   Palette: cream / navy / gold
   Type: Playfair Display · Source Sans 3 · IBM Plex Mono
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Sans+3:wght@300;400;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  /* Lorenz 2 palette */
  --cream:        #F5F0E8;
  --cream-dark:   #EDE6D6;
  --cream-border: #D8CEBC;
  --navy:         #0D1B3E;
  --navy-mid:     #1A2F5A;
  --navy-light:   #2A4070;
  --gold:         #C9A84C;
  --gold-light:   #E2C47A;
  --gold-pale:    #F5EAC8;
  --rust:         #8B3A2A;
  --slate:        #4A5568;
  --muted:        #7A8499;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --sidebar-w:    260px;
  --header-h:     60px;
  --max-prose:    760px;

  /* Shadows */
  --shadow-sm:    0 1px 4px rgba(13,27,62,0.08);
  --shadow-md:    0 4px 16px rgba(13,27,62,0.12);
  --shadow-lg:    0 8px 32px rgba(13,27,62,0.16);

  /* Transitions */
  --ease: 0.2s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--navy);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── GLOBAL HEADER ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 500;
  border-bottom: 2px solid var(--gold);
  box-shadow: var(--shadow-md);
}
.site-header .logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-header .logo-mark {
  width: 32px;
  height: 32px;
  border: 2px solid var(--gold);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: -1px;
}
.site-header .logo-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.01em;
}
.site-header .logo-text span { color: var(--gold); }
.site-header .header-sep {
  width: 1px;
  height: 28px;
  background: rgba(201,168,76,0.3);
}
.site-header .doc-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}
.site-header .header-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.site-header .header-nav a {
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  color: rgba(245,240,232,0.7);
  text-decoration: none;
  border-radius: 3px;
  transition: background var(--ease), color var(--ease);
  letter-spacing: 0.03em;
}
.site-header .header-nav a:hover,
.site-header .header-nav a.active {
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
}

/* ── LAYOUT ── */
.page-layout {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--navy-mid);
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(201,168,76,0.15);
  z-index: 200;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.25); border-radius: 2px; }

.sidebar-inner { padding: 16px 0 40px; }

.sidebar-section {
  margin-bottom: 4px;
}
.sidebar-section-label {
  padding: 10px 16px 4px;
  font-size: 9px;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(201,168,76,0.5);
}
.toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-family: var(--font-body);
  color: rgba(245,240,232,0.72);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--ease);
  line-height: 1.4;
}
.toc-link:hover {
  background: rgba(201,168,76,0.1);
  color: var(--cream);
  border-left-color: rgba(201,168,76,0.4);
}
.toc-link.active {
  background: rgba(201,168,76,0.18);
  color: var(--gold-light);
  border-left-color: var(--gold);
}
.toc-link.indent { padding-left: 28px; font-size: 11.5px; color: rgba(245,240,232,0.55); }
.toc-link.indent:hover,
.toc-link.indent.active { color: var(--gold-light); }
.toc-link .toc-badge {
  margin-left: auto;
  font-size: 9px;
  font-family: var(--font-mono);
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
}

/* ── MAIN CONTENT ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 40px 48px 80px;
}

/* ── CARDS / PANELS ── */
.card {
  background: #fff;
  border: 1px solid var(--cream-border);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}
.card-header {
  background: var(--navy);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 1;
}
.card-header .card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold-light);
}
.card-body { padding: 20px 24px 24px; }

/* Pillar header variant */
.card-header.pillar-1 { background: linear-gradient(135deg, #0D1B3E 0%, #1A2F5A 100%); border-left: 4px solid #4A90D9; }
.card-header.pillar-2 { background: linear-gradient(135deg, #0D1B3E 0%, #2A1A3E 100%); border-left: 4px solid #9B59B6; }
.card-header.pillar-3 { background: linear-gradient(135deg, #0D1B3E 0%, #1A3E2A 100%); border-left: 4px solid #27AE60; }
.card-header.pillar-4 { background: linear-gradient(135deg, #0D1B3E 0%, #3E2A1A 100%); border-left: 4px solid var(--gold); }

/* ── PROSE ── */
.prose { max-width: var(--max-prose); }
.prose p {
  margin-bottom: 16px;
  text-align: justify;
  hyphens: auto;
  font-size: 15px;
  color: #1a1f2e;
}
.prose p b, .prose p strong {
  color: var(--navy);
  font-weight: 700;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--navy);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}
.prose h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 22px 0 8px;
}

/* Subsection label within prose */
.subsec-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--navy-light);
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 10px;
}

/* ── FOOTNOTE REFS ── */
sup a {
  font-family: var(--font-mono);
  font-size: 0.68em;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  padding: 0 1px;
}
sup a:hover { text-decoration: underline; color: var(--rust); }

/* ── RECOMMENDATIONS ── */
.rec-box {
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-left: 5px solid var(--gold);
  border-radius: 3px;
  padding: 18px 20px;
  margin: 20px 0;
}
.rec-box .rec-title {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #7a5c00;
  margin-bottom: 12px;
}
.rec-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(201,168,76,0.25);
  font-size: 14px;
  line-height: 1.65;
}
.rec-item:last-child { border-bottom: none; }
.rec-num {
  min-width: 22px;
  height: 22px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
}
.rec-item em { color: #6b4c00; font-style: italic; }

/* ── PROGRESS CHIPS ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 10.5px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.chip-limited  { background: #FFF3CD; color: #856404; border: 1px solid #FFC107; }
.chip-some     { background: #D1ECF1; color: #0C5460; border: 1px solid #17A2B8; }
.chip-good     { background: #D4EDDA; color: #155724; border: 1px solid #28A745; }

/* ── TAGS ── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 3px 10px;
  background: var(--cream-dark);
  border: 1px solid var(--cream-border);
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--navy-mid);
  text-decoration: none;
  transition: all var(--ease);
}
.tag:hover {
  background: var(--navy);
  color: var(--gold-light);
  border-color: var(--navy);
}
.tag.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* ── CATEGORIES ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.category-card {
  background: #fff;
  border: 1px solid var(--cream-border);
  border-top: 3px solid var(--navy-light);
  border-radius: 3px;
  padding: 14px 16px;
  text-decoration: none;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}
.category-card:hover {
  border-top-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category-card .cat-label {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}
.category-card .cat-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}
.category-card .cat-count {
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--muted);
}

/* ── PILLAR COLOR ACCENTS ── */
.cat-p1 { border-top-color: #4A90D9; }
.cat-p2 { border-top-color: #9B59B6; }
.cat-p3 { border-top-color: #27AE60; }
.cat-p4 { border-top-color: var(--gold); }

/* ── NEWS / ACTIVITY FEED ── */
.news-feed { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-border);
  align-items: flex-start;
}
.news-item:last-child { border-bottom: none; }
.news-date {
  min-width: 70px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  padding-top: 3px;
  text-align: right;
}
.news-body .news-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 3px;
}
.news-body .news-title a { color: inherit; text-decoration: none; }
.news-body .news-title a:hover { color: var(--gold); }
.news-body .news-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-body);
}
.news-dot {
  min-width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── COMMENTS PLACEHOLDER ── */
.comments-area {
  background: #fff;
  border: 1px solid var(--cream-border);
  border-radius: 4px;
  padding: 20px 24px;
}
.comments-area .comments-header {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cream-border);
}
.github-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  text-decoration: none;
  transition: background var(--ease);
  letter-spacing: 0.04em;
}
.github-link-btn:hover { background: var(--navy-light); }

/* ── FOOTNOTES ── */
.fn-list { display: flex; flex-direction: column; }
.fn-entry {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(216,206,188,0.5);
  font-size: 13px;
  line-height: 1.6;
  color: var(--slate);
}
.fn-entry:last-child { border-bottom: none; }
.fn-entry:target { background: var(--gold-pale); border-radius: 3px; padding: 6px 6px; }
.fn-num {
  min-width: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-align: right;
  padding-top: 1px;
  flex-shrink: 0;
}
.fn-text { flex: 1; }
.fn-text a { color: var(--navy-light); font-size: 12px; word-break: break-all; }

/* ── SECTION DIVIDER ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 20px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-border);
}
.section-divider span {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

/* ── DOCUMENT META STRIP ── */
.doc-meta-strip {
  background: var(--navy);
  color: var(--cream);
  padding: 16px 24px;
  border-radius: 3px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.doc-meta-strip .meta-field { }
.doc-meta-strip .meta-field .mf-label {
  font-size: 9px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  margin-bottom: 2px;
}
.doc-meta-strip .meta-field .mf-value {
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--cream);
}

/* ── BACK TO TOP ── */
.back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  background: var(--navy);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 400;
  opacity: 0;
  transition: opacity var(--ease);
  text-decoration: none;
}
.back-top.visible { opacity: 1; }
.back-top:hover { background: var(--navy-light); }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-body);
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--navy-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--cream-border); }

/* ── PILLAR PILL ── */
.pillar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.pp-1 { background: rgba(74,144,217,0.12); color: #4A90D9; border: 1px solid rgba(74,144,217,0.3); }
.pp-2 { background: rgba(155,89,182,0.12); color: #9B59B6; border: 1px solid rgba(155,89,182,0.3); }
.pp-3 { background: rgba(39,174,96,0.12);  color: #27AE60; border: 1px solid rgba(39,174,96,0.3); }
.pp-4 { background: rgba(201,168,76,0.12); color: #C9A84C; border: 1px solid rgba(201,168,76,0.3); }

/* ── SEARCH BOX ── */
.search-wrap {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(201,168,76,0.12);
}
.search-wrap input {
  width: 100%;
  background: rgba(245,240,232,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 3px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--cream);
  outline: none;
}
.search-wrap input::placeholder { color: rgba(245,240,232,0.3); }
.search-wrap input:focus { border-color: var(--gold); }

mark { background: var(--gold-pale); padding: 0 2px; border-radius: 1px; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 24px 20px 60px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}

/* ── HERACLITUS EPIGRAPH ── */
.epigraph {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  padding: 12px 24px;
  border-top: 1px solid var(--cream-border);
  border-bottom: 1px solid var(--cream-border);
  margin: 16px 0 24px;
  letter-spacing: 0.02em;
}

/* ── SITE FOOTER ── */
.site-footer {
  background: var(--navy);
  color: rgba(245,240,232,0.5);
  text-align: center;
  padding: 20px 24px;
  font-size: 11px;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--gold);
}
.site-footer a { color: var(--gold-light); text-decoration: none; }
