/* ==============================================================
   THESIS — journal design system

   Deliberately quieter than the article cards: a thesis is a
   document, so it reads as a catalogue entry with a document
   spine on the left, not a photo card.
   ============================================================== */

.iw-thesis-sec { margin-top: var(--iw-sec-gap, 68px); }

.iw-thesis-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--iw-border);
  border: 1px solid var(--iw-border);
  border-radius: var(--iw-radius);
  overflow: hidden;
}

.iw-thesis-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 22px 24px;
  background: #fff;
  transition: background var(--iw-t, .3s ease);
  min-width: 0;
}
.iw-thesis-item:hover { background: var(--iw-gray-50); }

/* ── Document spine ── */
.iw-thesis-doc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 0;
  border-radius: var(--iw-radius-xs);
  background: var(--iw-gray-50);
  border: 1px solid var(--iw-border);
  color: var(--iw-navy);
  align-self: start;
}
.iw-thesis-doc svg { width: 26px; height: 26px; opacity: .78; }

.iw-thesis-pages {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--iw-muted);
}

.iw-thesis-body { min-width: 0; }

/* ── Discipline label ── */
.iw-thesis-disc {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--iw-orange-t, #c2410c);
  margin-bottom: 7px;
  transition: color var(--iw-t, .3s ease);
}
.iw-thesis-disc:hover { color: var(--iw-navy); }

/* ── Title ── */
.iw-thesis-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
  margin-bottom: 8px;
  overflow-wrap: break-word;
}
.iw-thesis-title a { color: var(--iw-navy); transition: color var(--iw-t, .3s ease); }
.iw-thesis-title a:hover { color: var(--iw-orange-t, #c2410c); }

.iw-thesis-abstract {
  font-size: 13px;
  line-height: 1.65;
  color: var(--iw-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Meta line ── */
.iw-thesis-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--iw-muted);
}
.iw-thesis-by { font-weight: 600; color: var(--iw-gray-700); }
.iw-thesis-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--iw-gray-300);
  flex: none;
}

/* ── Footer: supervisor + PDF ── */
.iw-thesis-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--iw-gray-200);
}
.iw-thesis-sup { font-size: 11.5px; color: var(--iw-gray-500); }

.iw-thesis-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 13px;
  border: 1.5px solid var(--iw-border);
  border-radius: var(--iw-radius-xs);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--iw-navy);
  transition: all var(--iw-t, .3s ease);
}
.iw-thesis-pdf:hover {
  background: var(--iw-navy);
  border-color: var(--iw-navy);
  color: #fff;
}

/* ══════════════════════════════════════════
   COMPACT — single post sidebar / below post
   ══════════════════════════════════════════ */
.iw-thesis-sec--compact { margin-top: 32px; }

.iw-thesis-compact-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--iw-navy);
  letter-spacing: -.01em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--iw-navy);
  margin-bottom: 4px;
}

.iw-thesis-sec--compact .iw-thesis-list {
  grid-template-columns: 1fr;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0;
}
.iw-thesis-sec--compact .iw-thesis-item {
  grid-template-columns: 44px 1fr;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--iw-gray-100);
}
.iw-thesis-sec--compact .iw-thesis-item:last-child { border-bottom: 0; }
.iw-thesis-sec--compact .iw-thesis-item:hover { background: transparent; }
.iw-thesis-sec--compact .iw-thesis-doc { padding: 9px 0; }
.iw-thesis-sec--compact .iw-thesis-doc svg { width: 18px; height: 18px; }
.iw-thesis-sec--compact .iw-thesis-title { font-size: 14px; margin-bottom: 6px; }

.iw-thesis-compact-all {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--iw-orange-t, #c2410c);
  transition: color var(--iw-t, .3s ease);
}
.iw-thesis-compact-all:hover { color: var(--iw-navy); }

/* ══════════════════════════════════════════
   SINGLE THESIS — details panel
   ══════════════════════════════════════════ */
.iw-thesis-details {
  border: 1px solid var(--iw-border);
  border-radius: var(--iw-radius);
  background: #fff;
  padding: 24px 26px;
  margin: 26px 0;
}
.iw-thesis-details h2 {
  font-size: 14px;
  font-weight: 800;
  color: var(--iw-navy);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--iw-navy);
  margin-bottom: 16px;
}
.iw-thesis-dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}
.iw-thesis-dl > div { min-width: 0; }
.iw-thesis-dl dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--iw-muted);
  margin-bottom: 3px;
}
.iw-thesis-dl dd {
  font-size: 14px;
  font-weight: 600;
  color: var(--iw-navy);
  overflow-wrap: break-word;
}

/* ══════════════════════════════════════════
   ARCHIVE — /thesis/
   ══════════════════════════════════════════ */
.iw-thesis-list--archive { grid-template-columns: 1fr; }
.iw-thesis-list--archive .iw-thesis-item { padding: 26px 28px; }
.iw-thesis-list--archive .iw-thesis-title { font-size: 19px; }

.iw-th-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.iw-th-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--iw-border);
  border-radius: var(--iw-radius-xs);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--iw-gray-700);
  transition: all var(--iw-t, .3s ease);
}
.iw-th-filter span {
  font-size: 11px;
  font-weight: 700;
  color: var(--iw-muted);
  background: var(--iw-gray-100);
  padding: 1px 7px;
  border-radius: 999px;
}
.iw-th-filter:hover { border-color: var(--iw-navy); color: var(--iw-navy); }
.iw-th-filter.is-on {
  background: var(--iw-navy);
  border-color: var(--iw-navy);
  color: #fff;
}
.iw-th-filter.is-on span { background: rgba(255,255,255,.18); color: #fff; }

/* ══════════════════════════════════════════
   SINGLE THESIS
   ══════════════════════════════════════════ */
.iw-thesis-dl > div { break-inside: avoid; }

.iw-thesis-dl dd { font-weight: 600; }

.iw-thesis-single .iw-art-byline { align-items: flex-start; }
.iw-thesis-dl { margin: 0; }

.iw-thesis-abstract-full {
  margin: 28px 0;
  padding: 22px 26px;
  background: var(--iw-gray-50);
  border-left: 3px solid var(--iw-orange);
  border-radius: 0 var(--iw-radius-xs) var(--iw-radius-xs) 0;
}
.iw-thesis-abstract-full h2 {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 10px;
}
.iw-thesis-abstract-full p {
  font-size: 15px;
  line-height: 1.78;
  color: var(--iw-gray-700);
  max-width: 76ch;
}

.iw-thesis-dl + .iw-single-body { margin-top: 0; }

/* Download button sits at the end of the byline rule */
.iw-thesis-dl,
.iw-thesis-single .iw-thesis-dl { margin-top: 0; }
.iw-thesis-dl dt { white-space: nowrap; }

/* .iw-cite / .iw-cite-box / .iw-cite-copy live in journal.css — the
   citation block is shared with articles, and journal.css loads on
   every page. Keeping a copy here would be two sources of truth. */

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .iw-thesis-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .iw-thesis-item { grid-template-columns: 52px 1fr; gap: 14px; padding: 18px 16px; }
  .iw-thesis-doc svg { width: 20px; height: 20px; }
  .iw-thesis-dl { grid-template-columns: 1fr; }
  .iw-thesis-pdf { margin-left: 0; }
  .iw-thesis-foot { gap: 9px; }
}

@media (pointer: coarse) {
  .iw-thesis-pdf { min-height: 40px; }
}
