/* ==========================================================================
   PART Shared Task — ArgMining 2027
   Leiden University huisstijl, minimal white.
   Colors:   huisstijl.universiteitleiden.nl/huisstijl/kleuren
             primary  Universiteitsblauw #001158 (Pantone 280 C)
             accent   Wiskunde en Natuurwetenschappen #BE4500 (Pantone 173 C)
             light    30%-intensity variants of the above
   Type:     primary  Merriweather (body) — web font
             secondary Vestula -> official web substitute Verdana (headings,
             tables, UI)
   ========================================================================== */

:root {
  --blue:        #001158;
  --blue-30:     #B2B5CC;
  --orange:      #BE4500;
  --orange-30:   #ECC7B3;
  --ink:         #16181d;
  --muted:       #565b66;
  --line:        #d8dbe4;
  --bg:          #ffffff;
  --bg-alt:      #f5f6fa;

  --font-body:   "Merriweather", Georgia, "Times New Roman", serif;
  --font-head:   Verdana, Geneva, "DejaVu Sans", Arial, sans-serif;

  --wrap: 1060px;
  --space-section: clamp(3rem, 7vw, 5rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--blue);
  line-height: 1.25;
  margin: 0 0 0.8em;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: 0.01em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--blue);
  margin-bottom: 1.5em;
}

h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

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

img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.6em 1.2em;
  z-index: 100;
  font-family: var(--font-head);
  font-size: 0.9rem;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand img { height: 44px; width: auto; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.35em 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--blue);
  border-bottom-color: var(--orange);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--space-section);
}

.kicker {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  margin-bottom: 1.2em;
  max-width: 18ch;
}
.hero h1 .abbrev { font-weight: 400; }

.lede {
  font-size: 1.125rem;
  max-width: 62ch;
  color: var(--ink);
}

/* ---------- buttons ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85em 1.3em;
  font-family: var(--font-head);
  font-size: 0.95rem;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid var(--blue);
  border-radius: 2px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-label { display: flex; flex-direction: column; }
.btn-label small {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #0a1d6b; color: #fff; }

.btn-outline { background: #fff; color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }

.btn-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  white-space: nowrap;
}

.data-note {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 62ch;
}

.univ { margin-top: 2.25rem; }

.univ-label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.univ-logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
}

.univ-logos img {
  height: 40px;
  width: auto;
}

.univ-logos img.logo-leiden { height: 72px; }

.univ-logos a { display: inline-block; }

/* ---------- sections ---------- */

section { padding: var(--space-section) 0; }
section + section { padding-top: 0; }
section[id] { scroll-margin-top: 5rem; }

section#task, section#organizers, section#references { padding-top: var(--space-section); }

.alt-bg { background: var(--bg-alt); }

/* ---------- dates ---------- */

section#dates { padding-top: var(--space-section); }

.dates-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-head);
  font-size: 0.95rem;
}

.dates-table th,
.dates-table td {
  text-align: left;
  padding: 0.7em 1em;
  border-bottom: 1px solid var(--line);
}

.dates-table thead th {
  background: var(--blue);
  color: #fff;
  border-bottom: 2px solid var(--blue);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dates-table tbody tr:hover { background: var(--bg-alt); }

.dates-table td:first-child,
.dates-table th:first-child {
  width: 1%;
  white-space: nowrap;
}

.dates-table .dates-final td {
  font-weight: 700;
  color: var(--blue);
  border-top: 2px solid var(--orange);
}

.table-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.8rem;
}

/* ---------- subtask / eval / organizer cards ---------- */

.subtask-grid,
.eval-grid,
.organizer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.subtask-card,
.eval-card,
.organizer {
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  padding: 1.4rem 1.5rem;
  background: var(--bg);
}

.subtask-card h4,
.eval-card h3 { margin-bottom: 0.6em; }

.io {
  font-size: 0.88rem;
  color: var(--muted);
  font-family: var(--font-head);
  border-top: 1px dashed var(--line);
  padding-top: 0.8em;
}

.organizer .meta {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-head);
  margin-bottom: 0.8em;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 1rem;
}

/* ---------- example puzzle ---------- */

.example {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) minmax(280px, 6fr);
  gap: 2rem;
  margin: 2rem 0 1rem;
}

.attack-graph {
  width: 100%;
  height: auto;
  display: block;
}

.attack-graph .edge {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}

.attack-graph .node circle {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}

.attack-graph .node-num {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  fill: var(--blue);
}

.attack-graph .node-label {
  font-family: var(--font-head);
  font-size: 12.5px;
  fill: var(--ink);
}

.attack-graph .node-sub {
  font-family: var(--font-head);
  font-size: 11.5px;
  fill: var(--muted);
}

.example-text blockquote {
  margin: 0;
  padding: 1.2rem 1.4rem;
  border-left: 3px solid var(--orange);
  background: var(--bg);
  font-size: 0.98rem;
}

.example-text blockquote p { margin-bottom: 0.7em; }
.example-text blockquote p:last-child { margin-bottom: 0; }

.fig-caption {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.8rem;
}

/* ---------- dataset ---------- */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.fact {
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fact-num {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

.fact-label {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.restrictions {
  padding-left: 1.3em;
}

.restrictions li {
  margin-bottom: 0.7em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.code-block {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.code-block code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ---------- references ---------- */

.references {
  padding-left: 1.4em;
  font-size: 0.95rem;
  color: var(--muted);
}

.references li {
  margin-bottom: 1em;
  line-height: 1.65;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 2.5rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

.footer-logos a { display: inline-block; }
.footer-logos img { height: 30px; width: auto; }
.footer-logos img.logo-leiden { height: 56px; }

.footer-note {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 1rem 0 0;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
  align-self: flex-start;
}

.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--orange); }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  body { font-size: 1rem; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav { gap: 0.1rem 1rem; font-size: 0.8rem; }

  .example { grid-template-columns: 1fr; }

  .cta-row .btn { width: 100%; justify-content: center; }
}

/* ---------- print ---------- */

@media print {
  .site-header, .site-footer, .cta-row, .skip-link { display: none; }
  body { font-size: 10pt; }
  .alt-bg { background: #fff; }
  a { color: inherit; text-decoration: underline; }
}
