/* Leiden University house style (digital adaptation)
 * Primary blue (Universiteitsblauw, Pantone 280 C): #001158
 * Teal accent (Pantone 7714 C): #007679
 * Red accent (Pantone 186 C): #be1908
 * Typography: Merriweather body (Georgia fallback), Verdana for UI chrome
 * (Vestula is the official heading face but is licence-restricted).
 */

:root {
  --leiden-blue: #001158;
  --leiden-blue-60: #334079;
  --leiden-blue-30: #b3b9cd;
  --leiden-blue-10: #e6e7ee;
  --leiden-teal: #007679;
  --leiden-teal-30: #b3d7d7;
  --leiden-red: #be1908;
  --ink: #1a1a1a;
  --ink-muted: #5b5b62;
  --rule: #dcdee5;
  --bg: #ffffff;
  --bg-soft: #f5f6fa;
  --bg-card: #ffffff;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(0, 17, 88, 0.06), 0 2px 8px rgba(0, 17, 88, 0.04);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-soft);
}

h1, h2, h3, h4, legend, .brand-text {
  font-family: Verdana, "DejaVu Sans", "Geneva", sans-serif;
  color: var(--leiden-blue);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }

p { margin: 0 0 1rem; }

a { color: var(--leiden-blue); }
a:hover { color: var(--leiden-teal); }

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header — mimics Leiden's deep-blue bar with the key monogram */
.site-header {
  background: var(--leiden-blue);
  color: #fff;
}
.site-header a { color: #fff; text-decoration: none; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand-mark {
  width: 44px;
  height: 44px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  position: relative;
}
/* Stylised key-in-shield glyph — not the official monogram, placeholder */
.brand-key {
  width: 18px;
  height: 26px;
  background:
    radial-gradient(circle at 50% 22%, var(--leiden-blue) 22%, transparent 23%),
    linear-gradient(var(--leiden-blue), var(--leiden-blue)) 50% 55% / 4px 18px no-repeat,
    linear-gradient(var(--leiden-blue), var(--leiden-blue)) 50% 72% / 10px 4px no-repeat,
    linear-gradient(var(--leiden-blue), var(--leiden-blue)) 50% 84% / 7px 4px no-repeat;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: #fff;
}
.brand-line1 { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.brand-line2 { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.02em; }

.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  font-family: Verdana, sans-serif;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: #fff; }

.header-stripe {
  height: 6px;
  background: linear-gradient(90deg,
    var(--leiden-blue) 0%,
    var(--leiden-blue) 40%,
    var(--leiden-teal) 40%,
    var(--leiden-teal) 75%,
    var(--leiden-red) 75%,
    var(--leiden-red) 100%);
}

.main-content { padding: 2.5rem 1.5rem 4rem; }

.site-footer {
  background: var(--leiden-blue);
  color: #dbe0ee;
  margin-top: 3rem;
  font-family: Verdana, sans-serif;
  font-size: 0.85rem;
}
.footer-inner { padding: 1.5rem 1.5rem; }
.site-footer p { margin: 0.2rem 0; }
.site-footer .muted { color: rgba(255,255,255,0.65); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0 1.5rem;
}
.hero .eyebrow {
  font-family: Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--leiden-teal);
  margin-bottom: 0.4rem;
}
.hero h1 { font-size: 2.4rem; }
.lead { font-size: 1.1rem; color: var(--ink-muted); }
.hero-card {
  background: var(--leiden-blue);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.hero-card dl.stats {
  margin: 0;
  display: grid;
  gap: 1rem;
}
.hero-card dt {
  font-family: Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  opacity: 0.75;
}
.hero-card dd {
  font-family: Verdana, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0.1rem 0 0;
}
.of5 { font-size: 1rem; font-weight: 400; opacity: 0.7; margin-left: 0.25rem; }

/* Panels */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--leiden-blue);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}
.panel-head { margin-bottom: 1rem; }
.panel-warn { border-top-color: var(--leiden-red); background: #fff8f6; }
.panel legend {
  padding: 0 0.5rem;
  font-size: 1.1rem;
}

/* Forms */
form.questionnaire fieldset { border: none; padding: 1.5rem 1.75rem; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: Verdana, sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
}
input[type=text], input[type=email], input[type=date], input:not([type]), select, textarea {
  font: inherit;
  font-family: Verdana, sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--leiden-teal);
  outline-offset: 1px;
  border-color: var(--leiden-teal);
}
textarea { resize: vertical; min-height: 60px; }
small.err { color: var(--leiden-red); font-family: Verdana, sans-serif; }
.form-error {
  background: #fff0ee;
  border-left: 4px solid var(--leiden-red);
  padding: 0.75rem 1rem;
  color: var(--leiden-red);
  font-family: Verdana, sans-serif;
}

.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: Verdana, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  border: 2px solid var(--leiden-blue);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--leiden-blue); color: #fff; }
.btn-primary:hover { background: var(--leiden-teal); border-color: var(--leiden-teal); color: #fff; }
.btn-ghost { background: transparent; color: var(--leiden-blue); }
.btn-ghost:hover { background: var(--leiden-blue-10); }

/* Criterion rows */
.criterion {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.criterion:last-child { border-bottom: none; }
.criterion-label { font-weight: 700; color: var(--leiden-blue); font-family: Verdana, sans-serif; }
.criterion-help { color: var(--ink-muted); font-size: 0.9rem; font-family: Verdana, sans-serif; }

.criterion-scale {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.scale-opt {
  flex: 1 1 0;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  padding: 0.6rem 0.4rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-family: Verdana, sans-serif;
  font-size: 0.78rem;
  color: var(--ink-muted);
  transition: border-color .12s, background .12s, color .12s;
}
.scale-opt input { position: absolute; opacity: 0; pointer-events: none; }
.scale-opt .scale-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--leiden-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.scale-opt.scale-na .scale-num { width: auto; height: 26px; padding: 0 0.5rem; font-size: 0.7rem; }
.scale-opt:hover { border-color: var(--leiden-teal); color: var(--ink); }
.scale-opt:has(input:checked) {
  border-color: var(--leiden-blue);
  background: var(--leiden-blue-10);
  color: var(--leiden-blue);
}
.scale-opt:has(input:checked) .scale-num {
  background: var(--leiden-blue);
  color: #fff;
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-family: Verdana, sans-serif;
  font-size: 0.92rem;
}
.table th, .table td {
  padding: 0.75rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.table thead th {
  background: var(--leiden-blue-10);
  color: var(--leiden-blue);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table tr:hover td { background: var(--bg-soft); }
.num { text-align: right; white-space: nowrap; }
.small { font-size: 0.8rem; }

/* Report */
.report-head {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 1rem 0 0.5rem;
  align-items: start;
}
.eyebrow {
  font-family: Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--leiden-teal);
  margin: 0 0 0.4rem;
}
.score-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 6px solid var(--leiden-blue);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  font-family: Verdana, sans-serif;
}
.score-big {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--leiden-blue);
  line-height: 1;
}
.score-bar {
  margin-top: 0.75rem;
  background: var(--bg-soft);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}
.score-bar-fill {
  background: linear-gradient(90deg, var(--leiden-teal), var(--leiden-blue));
  height: 100%;
}

.score-pill {
  display: inline-block;
  min-width: 1.8rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  background: var(--leiden-blue-10);
  color: var(--leiden-blue);
  text-align: center;
  font-family: Verdana, sans-serif;
}
.score-high { background: #d7eee0; color: #0d5a2a; }
.score-mid { background: #fff3cc; color: #7a5400; }
.score-low { background: #ffd8d2; color: var(--leiden-red); }

.band {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-family: Verdana, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 0.6rem;
}
.band-excellent { background: #d1ecd5; color: #0d5a2a; }
.band-good { background: var(--leiden-teal-30); color: #004b4d; }
.band-adequate { background: var(--leiden-blue-10); color: var(--leiden-blue); }
.band-warn { background: #fff0d2; color: #7a5400; }
.band-poor { background: #ffd8d2; color: var(--leiden-red); }
.band-unrated { background: var(--bg-soft); color: var(--ink-muted); }

.concerns { list-style: none; padding: 0; margin: 0; }
.concerns li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.concerns li:last-child { border-bottom: none; }

/* Misc */
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.msg {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  font-family: Verdana, sans-serif;
}
.msg.success { background: var(--leiden-teal-30); color: #004b4d; }
.muted { color: var(--ink-muted); }
.empty { padding: 2rem; text-align: center; color: var(--ink-muted); }

.criterion-list { list-style: none; padding: 0; margin: 0; }
.criterion-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.criterion-list li:last-child { border-bottom: none; }
.criterion-list strong { color: var(--leiden-blue); font-family: Verdana, sans-serif; }

/* Responsive */
@media (max-width: 780px) {
  .hero, .report-head { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .site-nav { gap: 1rem; font-size: 0.85rem; }
  .header-inner { flex-wrap: wrap; }
  .scale-opt { min-width: 70px; padding: 0.5rem 0.3rem; font-size: 0.7rem; }
}
