
:root {
  --bg: #ffffff; /* White background */
  --text: #1d1d1f;
  --muted: #4b4b4f;
  --accent: #2b8a3e; /* green accent echoing Galeras.NET */
  --accent-2: #0a66c2; /* link blue */
  --border: #e6e6e6;
  --radius: 12px;
  --shadow: 0 8px 20px rgba(0,0,0,0.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
}
.skip-link { position: absolute; left: -9999px; top: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: #000; color: #fff; padding: 8px 12px; border-radius: 6px; }

.site-header { position: sticky; top: 0; z-index: 1000; background: var(--bg); border-bottom: 1px solid var(--border); }
.brand { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 16px; align-items: center; padding: 16px clamp(16px, 4vw, 32px); }
.logo { max-height: 64px; width: auto; }
.titles h1 { margin: 0; font-size: clamp(1.25rem, 2.8vw, 2rem); }
.tagline { margin: 4px 0; color: var(--muted); font-style: italic; }
.authors, .affiliation { margin: 0; color: var(--muted); }

.top-nav { display: flex; align-items: center; justify-content: space-between; padding: 8px clamp(16px, 4vw, 32px); }
.nav-toggle { display: none; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 8px; }
.nav-list a:hover, .nav-list a.active { background: #f7f7f8; }

.section { padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--border); }
.section h2 { margin-top: 0; font-size: clamp(1.3rem, 3vw, 1.8rem); }
.syllabus-img { width: 100%; max-width: 900px; display: block; margin-top: 12px; border-radius: var(--radius); box-shadow: var(--shadow); }

.checklist, .bullets { line-height: 1.7; }
.checklist li::marker { content: "✅ "; }
.bullets li::marker { content: "• "; }

.controls { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; margin-bottom: 12px; }
#search { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.ct-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.ct-filters label { background: #f7f7f8; padding: 6px 10px; border-radius: 20px; border: 1px solid var(--border); }
.view-toggle .view-btn { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.view-toggle .view-btn.active { border-color: var(--accent); color: var(--accent); }

/* Table view */
.table { width: 100%; border-collapse: collapse; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table thead { background: #f7f7f8; }
.badge { display: inline-block; margin: 2px 6px 2px 0; padding: 4px 8px; background: #f0fff4; color: var(--accent); border: 1px solid #c9eacb; border-radius: 999px; font-size: 0.85em; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--accent-2); text-decoration: none; }
.btn:hover { background: #f7f7f8; }

/* Card view */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; background: #fff; }
.card h3 { margin-top: 0; }
.card .principles { margin: 8px 0; }
.card .principles .badge { background: #eef7ff; color: var(--accent-2); border-color: #cde0f7; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Dialog */
dialog { border: none; border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; }
dialog::backdrop { background: rgba(0,0,0,0.35); }
#sessionDialog .dialog-body { padding: 16px 20px; }
#sessionDialog h3 { margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--border); background: #f7f7f8; }
#sessionDialog .dialog-actions { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
#closeDialog { padding: 8px 12px; }

/* Footer */
.site-footer { padding: 24px; text-align: center; color: var(--muted); }
.footer-logos { display: flex; justify-content: center; gap: 24px; align-items: center; margin-bottom: 12px; }

/* Back to top */
.back-to-top { position: fixed; right: 16px; bottom: 16px; padding: 10px 12px; border-radius: 50%; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); display: none; }

/* Responsive nav */
@media (max-width: 860px) {
  .brand { grid-template-columns: 1fr; text-align: center; }
  .left, .right { justify-self: center; }
  .nav-toggle { display: inline-block; }
  .nav-list { display: none; flex-direction: column; gap: 0; }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 12px 8px; }
}

.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
