﻿/* ============================================
   Academic Style for Chapter 5 Supplementary Pages
   ============================================ */

/* === ROOT VARIABLES === */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --light-bg: #ecf0f1;
  --dark-bg: #34495e;
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  --border-color: #bdc3c7;
  --code-bg: #f8f9fa;
  --link-color: #3498db;
  --link-hover: #2980b9;
}

/* === GLOBAL RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === ACCESSIBILITY === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--secondary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* === BODY & TYPOGRAPHY === */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: #ffffff;
  font-size: 16px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary-color);
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2.5em;
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 0.3em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 2em;
  border-bottom: 2px solid var(--light-bg);
  padding-bottom: 0.2em;
}

h3 {
  font-size: 1.5em;
  color: var(--secondary-color);
}

h4 {
  font-size: 1.2em;
}

p {
  margin-bottom: 1.2em;
  text-align: justify;
}

/* === LINKS === */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* === MODULE CARDS === */
.module-card {
  position: relative;
}

.module-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.module-link:hover {
  text-decoration: none;
}

.module-header {
  margin-bottom: 1rem;
}

.module-title {
  color: inherit;
  margin: 0;
}

.module-description {
  color: #2c3e50;
  line-height: 1.6;
  margin: 15px 0;
  font-weight: 400;
}

.module-topics {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.module-topics li {
  padding: 5px 0;
  padding-left: 20px;
  position: relative;
}

.module-topics li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
}

.module-meta {
  margin-top: auto;
  padding-top: 15px;
}

/* === HEADER & NAVIGATION === */
.site-header {
  margin-bottom: 30px;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  color: var(--primary-color);
  margin-top: 0;
}

.page-content {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  min-height: 70vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 20px;
}

/* === NAVIGATION === */
.nav-bar {
  background-color: #5568d3;
  color: white;
  padding: 15px 30px;
  margin: -20px -20px 30px -20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(85, 104, 211, 0.3);
}

.nav-bar .logo {
  font-size: 1.3em;
  font-weight: bold;
}

.nav-bar nav a {
  color: white;
  margin-left: 20px;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.nav-bar nav a:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
}

/* === BREADCRUMB === */
.breadcrumb {
  background-color: #f8f9fa;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 0.9em;
  border: 1px solid #e0e0e0;
}

.breadcrumb a {
  color: var(--text-color);
}

.breadcrumb span {
  margin: 0 5px;
  color: var(--text-light);
}

/* === BOXES & CALLOUTS === */
.info-box,
.warning-box,
.tip-box,
.example-box {
  padding: 15px 20px;
  margin: 20px 0;
  border-left: 5px solid;
  border-radius: 5px;
  background-color: var(--code-bg);
}

.info-box {
  border-left-color: var(--secondary-color);
  background-color: #e8f4f8;
}

.info-box::before {
  content: "INFO: ";
  font-weight: bold;
  color: var(--secondary-color);
}

.warning-box {
  border-left-color: var(--warning-color);
  background-color: #fef5e7;
}

.warning-box::before {
  content: "LET OP: ";
  font-weight: bold;
  color: var(--warning-color);
}

.tip-box {
  border-left-color: var(--success-color);
  background-color: #e8f8f5;
}

.tip-box::before {
  content: "TIP: ";
  font-weight: bold;
  color: var(--success-color);
}

.example-box {
  border-left-color: #9b59b6;
  background-color: #f4ecf7;
}

.example-box::before {
  content: "VOORBEELD: ";
  font-weight: bold;
  color: #9b59b6;
}

/* Ensure all code blocks inside boxes are visible */
.info-box pre,
.warning-box pre,
.tip-box pre,
.example-box pre {
  background: #ffffff;
  color: #2c3e50;
  border: 1px solid #dee2e6;
  padding: 12px;
  margin: 10px 0;
}

.info-box code,
.warning-box code,
.tip-box code,
.example-box code {
  color: #2c3e50;
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 5px;
}

/* Lead paragraph for introductions */
.lead {
  font-size: 1.15em;
  color: #2c3e50;
  line-height: 1.7;
  margin-bottom: 25px;
  font-weight: 400;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 5px;
}

/* Key concept box - important conceptual information */
.key-concept {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-left: 5px solid #4caf50;
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.key-concept h3 {
  margin-top: 0;
  color: #2e7d32;
  font-size: 1.2em;
}

.key-concept ul {
  margin-bottom: 0;
}

/* Formula box - mathematical formulas and definitions */
.formula-box {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-left: 5px solid #ff9800;
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.formula-box p {
  margin: 8px 0;
  font-family: 'Courier New', Courier, monospace;
}

.formula-box strong {
  color: #e65100;
}

/* Code box - for code examples */
.code-box {
  background: #ffffff;
  border-left: 5px solid #607d8b;
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(96, 125, 139, 0.15);
  border: 1px solid #e0e0e0;
}

.code-box h3 {
  margin-top: 15px;
  margin-bottom: 10px;
  color: #2c3e50;
  font-size: 1.1em;
}

.code-box h3:first-child {
  margin-top: 0;
}

.code-box pre {
  margin: 10px 0 20px 0;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 15px;
  color: #2c3e50;
  overflow-x: auto;
}

.code-box code {
  color: #2c3e50;
  background: transparent;
  font-size: 0.9em;
  line-height: 1.6;
}

/* Boxplot explanation - special formatting for ASCII art */
.boxplot-explanation {
  background: #fafafa;
  border: 2px solid #90a4ae;
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
  text-align: center;
}

.boxplot-explanation pre {
  background: transparent;
  border: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1em;
  line-height: 1.3;
  margin: 10px 0;
  padding: 0;
}

.boxplot-explanation p {
  margin-top: 15px;
  font-weight: 600;
  color: #37474f;
}

/* Highlight text within examples */
.highlight {
  background-color: #fff59d;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 600;
}

/* === CODE BLOCKS === */
code {
  background-color: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  color: #d63384;
  font-weight: 500;
}

pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-left: 4px solid #3498db;
  padding: 15px;
  overflow-x: auto;
  border-radius: 5px;
  margin: 20px 0;
  color: #2c3e50;
  line-height: 1.5;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: #2c3e50;
  font-weight: 400;
}

/* === TABLES === */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

thead {
  background-color: var(--primary-color);
  color: white;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid var(--border-color);
}

tbody tr:nth-child(even) {
  background-color: var(--light-bg);
}

tbody tr:hover {
  background-color: #d5dbdb;
  cursor: pointer;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
}

/* === LISTS === */
ul,
ol {
  margin-left: 25px;
  margin-bottom: 1.2em;
}

li {
  margin-bottom: 0.5em;
}

ul li::marker {
  color: var(--secondary-color);
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: 500;
  margin: 5px;
}

.btn:hover {
  background-color: var(--link-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--secondary-color);
}

.btn-success {
  background-color: var(--success-color);
}

.btn-warning {
  background-color: var(--warning-color);
}

.btn-danger {
  background-color: var(--accent-color);
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--secondary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--link-hover);
  transform: translateY(-5px);
}

/* === FOOTER === */
.footer {
  margin-top: 50px;
  padding: 20px 0;
  border-top: 2px solid var(--light-bg);
  text-align: center;
  color: var(--text-light);
  font-size: 0.9em;
}

.footer a {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* === RELATED PAGES === */
.related-pages {
  background-color: var(--light-bg);
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0;
}

.related-pages h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.related-pages ul {
  list-style: none;
  margin-left: 0;
}

.related-pages li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.related-pages li:last-child {
  border-bottom: none;
}

.related-pages a {
  font-weight: 500;
  display: flex;
  align-items: center;
}

.related-pages a::before {
  content: "- ";
  margin-right: 8px;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  body {
    padding: 15px;
    font-size: 14px;
  }

  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.6em;
  }

  h3 {
    font-size: 1.3em;
  }

  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
    margin: -15px -15px 20px -15px;
  }

  .nav-bar nav {
    margin-top: 10px;
  }

  .nav-bar nav a {
    margin-left: 0;
    margin-right: 10px;
    margin-top: 5px;
    display: inline-block;
  }

  table {
    font-size: 0.9em;
  }

  th,
  td {
    padding: 8px 10px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}

/* === PRINT STYLES === */
@media print {

  .nav-bar,
  .back-to-top,
  .related-pages {
    display: none;
  }

  body {
    max-width: 100%;
    padding: 0;
  }

  a {
    text-decoration: underline;
    color: black;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* === INDEX PAGE SPECIFIC STYLES === */
/* Background image only on index/home page */
body.home-page {
  background-image: url('../27428-1.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
}

body.home-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  z-index: -1;
}

/* Ensure chapter pages have solid white background */
body:not(.home-page) {
  background-color: #ffffff;
  background-image: none;
}

/* Hero section styling */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px 30px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 35px;
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.25);
}

.hero-section h1 {
  font-size: 1.9em;
  margin: 0 0 12px 0;
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: none;
}

.hero-section p {
  font-size: 1em;
  opacity: 0.93;
  margin: 0;
  line-height: 1.5;
  max-width: 900px;
  margin: 0 auto;
}

/* Cards grid layout */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.content-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.content-card h3 {
  color: #667eea;
  margin-top: 0;
  font-size: 1.3em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.content-card h3 a {
  color: #667eea;
  text-decoration: none;
}

.content-card h3 a:hover {
  text-decoration: underline;
}

.content-card .icon {
  font-size: 1.8em;
}

.content-card p {
  color: #555;
  line-height: 1.6;
  margin: 15px 0;
  text-align: left;
}

.content-card .btn {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
  font-weight: 600;
}

.content-card .btn:hover {
  background: #5568d3;
}

/* Details/Summary for collapsible sections */
.module-details {
  margin-top: 15px;
}

.module-details summary {
  cursor: pointer;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
  border-radius: 6px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #667eea;
  border: 1px solid #e0e5f0;
  transition: all 0.2s ease;
  list-style: none;
}

.module-details summary::-webkit-details-marker {
  display: none;
}

.module-details summary::after {
  content: "v";
  transition: transform 0.3s ease;
}

.module-details[open] summary::after {
  transform: rotate(180deg);
}

.module-details summary:hover {
  background: linear-gradient(135deg, #eef0f8 0%, #e8eaf5 100%);
  border-color: #667eea;
}

.module-nav {
  margin-top: 10px;
}

.module-nav ul {
  margin: 10px 0;
  padding-left: 20px;
}

.module-nav ul li {
  margin: 8px 0;
}

.module-nav ul li a {
  color: #667eea;
  text-decoration: none;
}

.module-nav ul li a:hover {
  text-decoration: underline;
}

/* Site footer */
.site-footer {
  margin-top: 40px;
  text-align: center;
  padding: 20px;
  border-top: 1px solid #e0e0e0;
}

.site-footer p {
  margin: 0;
  color: #666;
  text-align: center;
}

/* Breadcrumb navigation */
.breadcrumb {
  margin-bottom: 20px;
  font-size: 0.9em;
  color: #666;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb ol li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb ol li::after {
  content: ">";
  margin-left: 8px;
  color: #999;
}

.breadcrumb ol li:last-child::after {
  content: "";
}

.breadcrumb ol li[aria-current="page"] {
  font-weight: 600;
  color: #333;
}

.breadcrumb a {
  color: #667eea;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Logo subtext styling */
.logo-sub {
  font-weight: 400;
  font-size: 0.85em;
  opacity: 0.8;
}




/* === RSTUDIO-STYLE SYNTAX HIGHLIGHTING === */
/* Matches RStudio's default "Textmate" theme for familiarity */

/* Code container - RStudio console look */
.rstudio-code {
  background: #ffffff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 15px;
  margin: 15px 0;
  font-family: 'Consolas', 'Monaco', 'Lucida Console', 'Liberation Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* RStudio-style line numbers */
.rstudio-code .line-number {
  color: #999999;
  background: #f5f5f5;
  padding: 0 10px 0 5px;
  margin-right: 10px;
  border-right: 1px solid #e0e0e0;
  user-select: none;
  display: inline-block;
  min-width: 30px;
  text-align: right;
}

/* R Code syntax highlighting - RStudio colors */
.r-keyword {
  color: #0000FF;  /* RStudio: blue for keywords */
  font-weight: 600;
}

.r-function {
  color: #4A148C;  /* RStudio: purple for functions */
}

.r-string {
  color: #008000;  /* RStudio: green for strings */
}

.r-number {
  color: #099;     /* RStudio: teal for numbers */
}

.r-comment {
  color: #008000;  /* RStudio: green for comments */
  font-style: italic;
}

.r-operator {
  color: #000000;  /* RStudio: black for operators */
}

.r-pipe {
  color: #0000FF;  /* RStudio: blue for pipe %>% */
  font-weight: 600;
}

.r-argument {
  color: #666666;  /* RStudio: gray for argument names */
}

.r-constant {
  color: #AA22FF;  /* RStudio: purple for TRUE/FALSE/NA */
  font-weight: 600;
}

.r-package {
  color: #795E26;  /* RStudio: brown for package names */
}

/* Output styling - RStudio console output */
.r-output {
  color: #333333;
  background: #f8f9fa;
  border-left: 3px solid #4CAF50;
  padding: 10px 15px;
  margin: 10px 0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
}

.r-output::before {
  content: "Output:";
  display: block;
  color: #666;
  font-size: 11px;
  margin-bottom: 5px;
  font-weight: 600;
}

/* RStudio-style code chunk header */
.code-chunk-header {
  background: linear-gradient(to bottom, #f0f0f0, #e5e5e5);
  border: 1px solid #d4d4d4;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  padding: 5px 12px;
  font-size: 12px;
  color: #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-chunk-header .chunk-label {
  font-weight: 600;
  color: #333;
}

.code-chunk-header .chunk-language {
  background: #e0e0e0;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  color: #666;
}

/* Code chunk with header */
.code-chunk {
  margin: 20px 0;
}

.code-chunk .rstudio-code {
  border-radius: 0 0 4px 4px;
  margin-top: 0;
}

/* Interpretation box - for explaining results */
.interpretation-box {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-left: 5px solid #4CAF50;
  padding: 15px 20px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
}

.interpretation-box h4 {
  color: #2e7d32;
  margin: 0 0 10px 0;
  font-size: 1.1em;
}

.interpretation-box h4::before {
  content: "TIP: ";
}

.interpretation-box p {
  margin: 8px 0;
  color: #1b5e20;
}

.interpretation-box ul {
  margin: 10px 0;
  padding-left: 20px;
}

.interpretation-box li {
  margin: 5px 0;
  color: #1b5e20;
}

/* Warning interpretation */
.interpretation-warning {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-left: 5px solid #ff9800;
}

.interpretation-warning h4 {
  color: #e65100;
}

.interpretation-warning h4::before {
  content: "LET OP: ";
}

.interpretation-warning p,
.interpretation-warning li {
  color: #bf360c;
}

/* Copy button for code blocks */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.code-box:hover .copy-btn,
.rstudio-code:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: #e0e0e0;
}

/* Comparison table for RStudio vs Code */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.comparison-table th {
  background: #5568d3;
  color: white;
  padding: 12px;
  text-align: left;
}

.comparison-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
}

.comparison-table tr:nth-child(even) {
  background: #f8f9fa;
}

/* RStudio Environment pane look */
.environment-preview {
  background: #ffffff;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  margin: 15px 0;
}

.environment-preview-header {
  background: #f0f0f0;
  padding: 8px 12px;
  border-bottom: 1px solid #d4d4d4;
  font-weight: 600;
  font-size: 13px;
}

.environment-preview-content {
  padding: 10px 12px;
  font-family: 'Consolas', monospace;
  font-size: 12px;
}

.environment-preview-row {
  display: flex;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
}

.environment-preview-row:last-child {
  border-bottom: none;
}

.environment-preview-name {
  color: #0000FF;
  width: 150px;
}

.environment-preview-type {
  color: #666;
  width: 100px;
}

.environment-preview-value {
  color: #333;
  flex: 1;
}

/* ============================================================
   HOMEPAGE v2  (2026-06-04)
   ============================================================ */

/* Banner */
.hp-banner {
  background: #f8f9fc;
  border-bottom: 3px solid #1E64C8;
  padding: 60px 24px 52px;
}
.hp-banner-inner {
  max-width: 780px;
  margin: 0 auto;
}
.hp-banner-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1E64C8;
  margin: 0 0 14px;
}
.hp-title {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: #0d1b2e;
  margin: 0 0 16px;
  line-height: 1.15;
}
.hp-lead {
  font-size: 1rem;
  line-height: 1.75;
  color: #3d4f66;
  margin: 0;
  max-width: 640px;
}

/* Body wrapper */
.hp-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 52px 24px 40px;
}

/* Section titles */
.hp-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1E64C8;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dde3ef;
}
.hp-section-title--muted {
  color: #8a96a8;
}

/* Chapter cards */
.hp-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 52px;
}
.hp-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #dde3ef;
  border-left: 4px solid #1E64C8;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, border-left-color 0.18s, transform 0.15s;
}
.hp-card:hover {
  box-shadow: 0 4px 18px rgba(30,100,200,0.12);
  border-left-color: #0d4fa0;
  transform: translateX(3px);
}
.hp-card-num {
  flex-shrink: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: #c8d8f0;
  width: 42px;
  text-align: right;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hp-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hp-card-text strong {
  font-size: 0.97rem;
  font-weight: 700;
  color: #0d1b2e;
}
.hp-card-text span {
  font-size: 0.84rem;
  color: #5a6a80;
  line-height: 1.55;
}
.hp-card-arrow {
  font-size: 1.1rem;
  color: #1E64C8;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s, transform 0.15s;
}
.hp-card:hover .hp-card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Coming soon */
.hp-soon { }
.hp-soon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hp-soon-list span {
  background: #f0f2f7;
  color: #9aa3b2;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* Footer */
.hp-footer {
  border-top: 1px solid #dde3ef;
  background: #f8f9fc;
  text-align: center;
}
.hp-footer p {
  font-size: 0.8rem;
  color: #8a96a8;
  margin: 0;
}

/* ============================================================
   HOMEPAGE v2  (2026-06-04)
   ============================================================ */

/* Banner */
.hp-banner {
  background: #f8f9fc;
  border-bottom: 3px solid #1E64C8;
  padding: 60px 24px 52px;
}
.hp-banner-inner {
  max-width: 780px;
  margin: 0 auto;
}
.hp-banner-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1E64C8;
  margin: 0 0 14px;
}
.hp-title {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: #0d1b2e;
  margin: 0 0 16px;
  line-height: 1.15;
}
.hp-lead {
  font-size: 1rem;
  line-height: 1.75;
  color: #3d4f66;
  margin: 0;
  max-width: 640px;
}

/* Body wrapper */
.hp-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 52px 24px 40px;
}

/* Section titles */
.hp-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1E64C8;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dde3ef;
}
.hp-section-title--muted {
  color: #8a96a8;
}

/* Chapter cards */
.hp-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 52px;
}
.hp-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #dde3ef;
  border-left: 4px solid #1E64C8;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, border-left-color 0.18s, transform 0.15s;
}
.hp-card:hover {
  box-shadow: 0 4px 18px rgba(30,100,200,0.12);
  border-left-color: #0d4fa0;
  transform: translateX(3px);
}
.hp-card-num {
  flex-shrink: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: #c8d8f0;
  width: 42px;
  text-align: right;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hp-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hp-card-text strong {
  font-size: 0.97rem;
  font-weight: 700;
  color: #0d1b2e;
}
.hp-card-text span {
  font-size: 0.84rem;
  color: #5a6a80;
  line-height: 1.55;
}
.hp-card-arrow {
  font-size: 1.1rem;
  color: #1E64C8;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s, transform 0.15s;
}
.hp-card:hover .hp-card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Coming soon */
.hp-soon { }
.hp-soon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hp-soon-list span {
  background: #f0f2f7;
  color: #9aa3b2;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* Footer */
.hp-footer {
  border-top: 1px solid #dde3ef;
  background: #f8f9fc;
  text-align: center;
}
.hp-footer p {
  font-size: 0.8rem;
  color: #8a96a8;
  margin: 0;
}

/* ============================================================
   CHAPTER PAGE HEADER  (2026-06-04)
   ============================================================ */

.ch-page-header {
  background: #f8f9fc;
  border-bottom: 3px solid #1E64C8;
  padding: 44px 32px 40px;
  max-width: 100%;
}
.ch-page-num {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1E64C8;
  margin-bottom: 10px;
}
.ch-page-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: #0d1b2e;
  margin: 0 0 12px;
  line-height: 1.2;
}
.ch-page-sub {
  font-size: 0.95rem;
  color: #3d4f66;
  line-height: 1.65;
  margin: 0;
  max-width: 680px;
}

/* ============================================================
   CHAPTER PAGE HEADER  (2026-06-04)
   ============================================================ */

.ch-page-header {
  background: #f8f9fc;
  border-bottom: 3px solid #1E64C8;
  padding: 44px 32px 40px;
  max-width: 100%;
}
.ch-page-num {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1E64C8;
  margin-bottom: 10px;
}
.ch-page-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: #0d1b2e;
  margin: 0 0 12px;
  line-height: 1.2;
}
.ch-page-sub {
  font-size: 0.95rem;
  color: #3d4f66;
  line-height: 1.65;
  margin: 0;
  max-width: 680px;
}

/* ============================================================
   CHAPTER TOC LIST  (2026-06-04)
   ============================================================ */

.ch-toc-wrap {
  max-width: 860px;
  margin: 36px auto 0;
  padding: 0 24px;
}

.ch-toc-list {
  border: 1px solid #dde3ef;
  border-radius: 8px;
  overflow: hidden;
}

.ch-toc-entry {
  border-bottom: 1px solid #dde3ef;
}
.ch-toc-entry:last-child {
  border-bottom: none;
}

.ch-toc-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
}
.ch-toc-row:hover {
  background: #fafbff;
}

.ch-toc-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: #1E64C8;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.ch-toc-main {
  flex: 1;
  min-width: 0;
}

.ch-toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1E64C8;
  text-decoration: none;
  display: block;
  margin-bottom: 3px;
  line-height: 1.3;
}
.ch-toc-title:hover {
  text-decoration: underline;
}

.ch-toc-desc {
  font-size: 0.83rem;
  color: #556070;
  margin: 0;
  line-height: 1.5;
}

.ch-toc-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid #dde3ef;
  border-radius: 4px;
  color: #1E64C8;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 5px 10px;
  margin-top: 2px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.ch-toc-btn:hover {
  background: #1E64C8;
  color: #fff;
  border-color: #1E64C8;
}

.ch-toc-links {
  list-style: none;
  padding: 0 20px 14px 66px;
  margin: 0;
  background: #f8f9fc;
  border-top: 1px solid #eef1f8;
}
.ch-toc-links.is-hidden {
  display: none;
}

.ch-toc-links li {
  padding: 6px 0;
  border-bottom: 1px solid #eef1f8;
}
.ch-toc-links li:last-child {
  border-bottom: none;
}

.ch-toc-links a {
  font-size: 0.87rem;
  color: #2a3a50;
  text-decoration: none;
}
.ch-toc-links a::before {
  content: "\2192\00a0";
  color: #1E64C8;
  font-size: 0.8rem;
}
.ch-toc-links a:hover {
  color: #1E64C8;
  text-decoration: underline;
}

/* Chapter prev/next nav (bottom of index pages) */
.ch-chapter-nav {
  max-width: 860px;
  margin: 28px auto 48px;
  padding: 20px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #dde3ef;
}

.ch-chapter-prev,
.ch-chapter-next {
  font-size: 0.87rem;
  font-weight: 600;
  color: #1E64C8;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid #1E64C8;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.ch-chapter-prev:hover,
.ch-chapter-next:hover {
  background: #1E64C8;
  color: #fff;
}

/* ============================================================
   PAGE PAGER  (prev / up / next on subpages)
   ============================================================ */

.page-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 860px;
  margin: 48px auto 12px;
  padding: 20px 24px;
  border-top: 1px solid #dde3ef;
  background: #f8f9fc;
  border-radius: 0 0 6px 6px;
}

.pp-prev,
.pp-up,
.pp-next {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1E64C8;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid #c8d6ee;
  border-radius: 4px;
  background: #fff;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.pp-prev:hover,
.pp-up:hover,
.pp-next:hover {
  background: #1E64C8;
  color: #fff;
  border-color: #1E64C8;
}
.pp-up {
  color: #556070;
  border-color: #dde3ef;
  font-weight: 500;
}

/* ============================================================
   CHAPTER TOC LIST  (2026-06-04)
   ============================================================ */

.ch-toc-wrap {
  max-width: 860px;
  margin: 36px auto 0;
  padding: 0 24px;
}

.ch-toc-list {
  border: 1px solid #dde3ef;
  border-radius: 8px;
  overflow: hidden;
}

.ch-toc-entry {
  border-bottom: 1px solid #dde3ef;
}
.ch-toc-entry:last-child {
  border-bottom: none;
}

.ch-toc-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
}
.ch-toc-row:hover {
  background: #fafbff;
}

.ch-toc-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: #1E64C8;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

.ch-toc-main {
  flex: 1;
  min-width: 0;
}

.ch-toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1E64C8;
  text-decoration: none;
  display: block;
  margin-bottom: 3px;
  line-height: 1.3;
}
.ch-toc-title:hover {
  text-decoration: underline;
}

.ch-toc-desc {
  font-size: 0.83rem;
  color: #556070;
  margin: 0;
  line-height: 1.5;
}

.ch-toc-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid #dde3ef;
  border-radius: 4px;
  color: #1E64C8;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 5px 10px;
  margin-top: 2px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.ch-toc-btn:hover {
  background: #1E64C8;
  color: #fff;
  border-color: #1E64C8;
}

.ch-toc-links {
  list-style: none;
  padding: 0 20px 14px 66px;
  margin: 0;
  background: #f8f9fc;
  border-top: 1px solid #eef1f8;
}
.ch-toc-links.is-hidden {
  display: none;
}

.ch-toc-links li {
  padding: 6px 0;
  border-bottom: 1px solid #eef1f8;
}
.ch-toc-links li:last-child {
  border-bottom: none;
}

.ch-toc-links a {
  font-size: 0.87rem;
  color: #2a3a50;
  text-decoration: none;
}
.ch-toc-links a::before {
  content: "\2192\00a0";
  color: #1E64C8;
  font-size: 0.8rem;
}
.ch-toc-links a:hover {
  color: #1E64C8;
  text-decoration: underline;
}

/* Chapter prev/next nav (bottom of index pages) */
.ch-chapter-nav {
  max-width: 860px;
  margin: 28px auto 48px;
  padding: 20px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #dde3ef;
}

.ch-chapter-prev,
.ch-chapter-next {
  font-size: 0.87rem;
  font-weight: 600;
  color: #1E64C8;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid #1E64C8;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.ch-chapter-prev:hover,
.ch-chapter-next:hover {
  background: #1E64C8;
  color: #fff;
}

/* ============================================================
   PAGE PAGER  (prev / up / next on subpages)
   ============================================================ */

.page-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 860px;
  margin: 48px auto 12px;
  padding: 20px 24px;
  border-top: 1px solid #dde3ef;
  background: #f8f9fc;
  border-radius: 0 0 6px 6px;
}

.pp-prev,
.pp-up,
.pp-next {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1E64C8;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid #c8d6ee;
  border-radius: 4px;
  background: #fff;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.pp-prev:hover,
.pp-up:hover,
.pp-next:hover {
  background: #1E64C8;
  color: #fff;
  border-color: #1E64C8;
}
.pp-up {
  color: #556070;
  border-color: #dde3ef;
  font-weight: 500;
}


/* ============================================================
   HOMEPAGE v3 REDESIGN  (2026-06-11)
   Full redesign: sticky header, dark hero, grouped card grid
   ============================================================ */

/* Reset for homepage */
body.home-page {
  padding: 0;
  max-width: none;
  background: #f0f4f8;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Sticky header ── */
.site-header {
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.09);
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.site-logo-uni {
  font-weight: 400;
  color: #64748b;
  font-size: 0.85rem;
}
.site-logo-sep {
  color: #cbd5e1;
  font-size: 0.75rem;
}
.site-logo-name {
  font-weight: 800;
  color: #1E64C8;
  letter-spacing: -0.01em;
}
.site-logo:hover .site-logo-name {
  color: #1553a8;
  text-decoration: none;
}
.site-nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.site-nav-links a {
  font-size: 0.87rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.site-nav-links a:hover {
  background: #f0f4f8;
  color: #1E64C8;
  text-decoration: none;
}

/* ── Hero ── */
.site-hero {
  background: linear-gradient(135deg, #0a1628 0%, #1e3a6e 55%, #0f4c8a 100%);
  padding: 80px 28px 90px;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}
.site-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,100,200,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.site-hero-content {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.site-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #60a5fa;
  margin: 0 0 18px;
}
.site-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 22px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  border: none;
}
.site-hero-desc {
  font-size: 1.05rem;
  color: #93b4d6;
  line-height: 1.72;
  max-width: 600px;
  margin: 0 0 36px;
}
.site-hero-desc em {
  color: #bdd3f0;
  font-style: italic;
}
.site-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1E64C8;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(30,100,200,0.35);
}
.site-hero-cta:hover {
  background: #1553a8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,100,200,0.45);
  text-decoration: none;
  color: #fff;
}

/* ── Main container ── */
.site-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 28px 48px;
}

/* ── Section label ── */
.site-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1E64C8;
  margin: 0 0 36px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
  border-top: none;
}

/* ── Group ── */
.site-group {
  margin-bottom: 44px;
}
.site-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
}
.site-group-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot, #1E64C8);
  flex-shrink: 0;
}

/* ── Card grid ── */
.site-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

/* ── Card ── */
.site-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px 22px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 18px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s, transform 0.18s;
  border-top: 4px solid var(--card-col, #1E64C8);
}
.site-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 12px 40px rgba(0,0,0,0.06);
  transform: translateY(-4px);
  text-decoration: none;
}
.site-card-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--card-col, #1E64C8);
  opacity: 0.18;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
}
.site-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}
.site-card-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.58;
  flex: 1;
}
.site-card-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--card-col, #1E64C8);
  margin-top: 6px;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.site-card:hover .site-card-cta {
  opacity: 1;
}

/* Color variants */
.site-card--teal  { --card-col: #0891b2; }
.site-card--blue  { --card-col: #1d4ed8; }
.site-card--purple{ --card-col: #7c3aed; }
.site-card--sky   { --card-col: #0ea5e9; }

/* ── Coming soon ── */
.site-soon {
  padding: 36px 0 0;
  border-top: 2px solid #e2e8f0;
}
.site-soon-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 16px;
  border: none;
}
.site-soon-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-soon-pills span {
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  border: 1px solid #e2e8f0;
}

/* ── Footer ── */
.site-footer-bar {
  background: #0a1628;
  padding: 28px 24px;
  text-align: center;
  margin-top: 0;
}
.site-footer-bar p {
  font-size: 0.82rem;
  color: #475569;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-hero { padding: 56px 20px 64px; }
  .site-hero-title { font-size: 2rem; }
  .site-nav { padding: 0 16px; }
  .site-logo-uni, .site-logo-sep { display: none; }
  .site-cards { grid-template-columns: 1fr; }
  .site-container { padding: 40px 20px 32px; }
}

/* ============================================================
   DATASET DOWNLOAD PAGE
   ============================================================ */

.datasets-page .site-hero-desc {
  max-width: 660px;
}

.dataset-note {
  background: #fff;
  border-left: 4px solid #0ea5e9;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 18px rgba(0,0,0,0.04);
  margin-bottom: 24px;
  padding: 20px 22px;
}

.dataset-note h3 {
  border: none;
  color: #1e293b;
  font-size: 1rem;
  margin: 0 0 8px;
}

.dataset-note p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0;
  text-align: left;
}

.dataset-toolbar {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dataset-search {
  color: #475569;
  display: grid;
  flex: 1;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0.06em;
  max-width: 520px;
  text-transform: uppercase;
}

.dataset-search input {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0;
  padding: 11px 13px;
  text-transform: none;
}

.dataset-search input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
  outline: none;
}

.dataset-count {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.dataset-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.dataset-card {
  background: #fff;
  border-radius: 10px;
  border-top: 4px solid #0ea5e9;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 18px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
}

.dataset-card-meta {
  color: #64748b;
  display: flex;
  font-size: 0.76rem;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dataset-card h3 {
  border: none;
  color: #1e293b;
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
}

.dataset-card p {
  color: #64748b;
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

.dataset-card code {
  background: #f1f5f9;
  border-radius: 6px;
  color: #475569;
  display: block;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
  padding: 8px;
}

.dataset-download {
  align-self: flex-start;
  background: #0ea5e9;
  border-radius: 6px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 14px;
  text-decoration: none;
}

.dataset-download:hover {
  background: #0284c7;
  color: #fff;
  text-decoration: none;
}

.dataset-empty {
  background: #fff;
  border-radius: 10px;
  color: #64748b;
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  text-align: left;
}

@media (max-width: 640px) {
  .dataset-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dataset-search {
    max-width: none;
  }

  .dataset-count {
    white-space: normal;
  }
}
