/* ══════════════════════════════════════════════════════════════════════
   UOWD Digital Outputs Repository
   Institutional repository — academic visual identity
   Brand palette: Navy #001641 · Bright Blue #0033FF · UOW Red #ED0A00
   ══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

:root {
  /* ── UOWD brand ── */
  --navy:        #001641;
  --navy-700:    #051d52;
  --navy-600:    #0a2a6b;
  --blue:        #0033ff;
  --blue-600:    #0029cc;
  --blue-050:    #eef2ff;
  --red:         #ed0a00;
  --red-600:     #c70800;

  /* ── neutrals ── */
  --ink:         #11203b;
  --ink-soft:    #3a4a63;
  --muted:       #647389;
  --line:        #e4e8f0;
  --line-soft:   #eef1f6;
  --paper:       #ffffff;
  --paper-2:     #f6f8fc;
  --paper-3:     #eef2f8;

  /* ── type ── */
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: 'Source Serif 4', Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, Menlo, monospace;

  /* ── geometry ── */
  --max-w: 1080px;
  --r-sm: 5px;
  --r:    9px;
  --r-lg: 14px;

  /* ── elevation ── */
  --sh-xs: 0 1px 2px rgba(8, 22, 54, 0.05);
  --sh-sm: 0 1px 3px rgba(8, 22, 54, 0.06), 0 1px 2px rgba(8, 22, 54, 0.04);
  --sh:    0 4px 14px -6px rgba(8, 22, 54, 0.14);
  --sh-md: 0 12px 30px -12px rgba(8, 22, 54, 0.22);
  --sh-lg: 0 24px 50px -18px rgba(8, 22, 54, 0.28);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.22s var(--ease);
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper-2);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(0, 51, 255, 0.16); color: var(--navy); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ══════════════════════════════════════════════════════════════════════
   Header — white UOWD bar with navy strip + brand mark
   ══════════════════════════════════════════════════════════════════════ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(8, 22, 54, 0.02), 0 6px 24px -18px rgba(8, 22, 54, 0.5);
}
header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy) 55%, var(--blue) 55%, var(--blue) 80%, var(--red) 80%, var(--red) 100%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.95rem 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}
.site-brand::before {
  content: "U";
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-600) 100%);
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 2px 6px -2px rgba(0, 22, 65, 0.5);
  position: relative;
}
.site-brand-name {
  font-family: var(--sans);
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 1.1;
  color: var(--navy);
  -webkit-text-fill-color: currentColor;
}
.site-brand:hover .site-brand-name { color: var(--blue); }

header nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  align-items: center;
}
header nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
header nav a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.32rem;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
header nav a:hover { color: var(--navy); }
header nav a:hover::after { transform: scaleX(1); }
header nav a.active { color: var(--navy); }
header nav a.active::after { transform: scaleX(1); background: var(--red); }

/* ── main canvas ── */
main {
  flex: 1;
  padding: 3rem 1.75rem 4.5rem;
}
main.container { padding: 3rem 1.75rem 4.5rem; }

/* ══════════════════════════════════════════════════════════════════════
   Footer
   ══════════════════════════════════════════════════════════════════════ */
footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.72);
  margin-top: auto;
  position: relative;
}
footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 60%, var(--red) 60%, var(--red) 100%);
}
.footer-inner {
  text-align: center;
  padding: 2.75rem 0;
}
.footer-inner p {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.footer-sub {
  font-size: 0.8rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

/* ══════════════════════════════════════════════════════════════════════
   Typography
   ══════════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); }

h1 {
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.18;
  letter-spacing: -0.012em;
}
h2 {
  font-size: 1.55rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.008em;
}
h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin: 1.6rem 0 0.7rem;
}
p { margin: 0 0 1.2rem; }

a { color: var(--blue); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }

.lead {
  font-family: var(--sans);
  font-size: 1.16rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
  line-height: 1.6;
  max-width: 60ch;
}

.hint { color: var(--muted); font-style: italic; font-size: 0.9rem; }
.text-muted { color: var(--muted); }
.text-warning { color: #b45309; font-weight: 600; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.82rem; }

/* ══════════════════════════════════════════════════════════════════════
   Page hero — academic banner with accent rule
   ══════════════════════════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  padding: 2.25rem 0 2rem 1.75rem;
  margin: -0.5rem 0 2.75rem;
}
.page-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--blue) 100%);
}
.page-hero h1 { margin-bottom: 0.85rem; }
.page-hero .lead { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════════════════
   Prose (rendered Markdown)
   ══════════════════════════════════════════════════════════════════════ */
.prose { max-width: 72ch; }
.prose h2, .prose h3 { color: var(--navy); }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1.4rem; }
.prose li { margin-bottom: 0.45rem; line-height: 1.7; }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-3);
  padding: 0.15rem 0.4rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--red-600);
}
.prose pre {
  background: var(--navy);
  color: #e8edf7;
  border: none;
  padding: 1.2rem 1.35rem;
  border-radius: var(--r);
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: var(--sh);
}
.prose pre code { background: none; border: none; color: inherit; padding: 0; }
.prose blockquote {
  border-left: 4px solid var(--blue);
  margin: 1.5rem 0;
  padding: 0.4rem 0 0.4rem 1.25rem;
  color: var(--ink-soft);
  font-style: italic;
  background: var(--blue-050);
  border-radius: 0 var(--r) var(--r) 0;
}

/* ══════════════════════════════════════════════════════════════════════
   Item list — academic result cards
   ══════════════════════════════════════════════════════════════════════ */
.recent-items { margin-top: 0.5rem; }

.item-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.item-list-entry {
  background: var(--paper);
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.item-list-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh);
  border-color: var(--line);
  border-left-color: var(--blue);
}
.item-list-entry:has(.item-type-report) { border-left-color: var(--blue); }
.item-list-entry:has(.item-type-poster) { border-left-color: #0e9f6e; }

.item-title {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--navy);
  display: block;
  margin-bottom: 0.55rem;
  line-height: 1.35;
  text-decoration: none;
  letter-spacing: -0.005em;
}
.item-title:hover { color: var(--blue); text-decoration: none; }

.item-meta {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.item-abstract {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  line-height: 1.6;
}

/* ── type badges ── */
.item-type {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1;
}
.item-type-report { background: var(--blue-050); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(0,51,255,0.14); }
.item-type-poster { background: #e6f7f0; color: #0a7a52; box-shadow: inset 0 0 0 1px rgba(14,159,110,0.18); }

/* ══════════════════════════════════════════════════════════════════════
   Buttons (public)
   ══════════════════════════════════════════════════════════════════════ */
.btn-primary, .btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 0.72rem 1.5rem;
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--sh-sm);
  transition: var(--t);
}
.btn-primary:hover, .btn-download:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(0, 51, 255, 0.55);
  text-decoration: none;
}
.btn-download {
  background: var(--blue);
  font-size: 0.88rem;
  padding: 0.8rem 1.65rem;
}
.btn-download:hover { background: var(--navy); box-shadow: var(--sh-md); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--paper);
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 0.68rem 1.35rem;
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--sh-xs);
  transition: var(--t);
}
.btn-secondary:hover {
  background: var(--paper-2);
  border-color: #cdd5e2;
  color: var(--navy);
  text-decoration: none;
}

.btn-link {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--t), color 0.15s var(--ease);
}
.btn-link:hover { color: var(--blue-600); gap: 0.5rem; text-decoration: none; }

/* ══════════════════════════════════════════════════════════════════════
   Filter & search forms
   ══════════════════════════════════════════════════════════════════════ */
.filter-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.4rem;
  margin-bottom: 2rem;
  box-shadow: var(--sh-sm);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.filter-row label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.filter-row select,
.search-row input[type="search"] {
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  transition: var(--t);
}
.filter-row select {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 2rem 0.5rem 0.8rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23647389' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.95rem;
}
.filter-row select:focus,
.search-row input[type="search"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 255, 0.13);
}

.search-form { margin-bottom: 2rem; }
.search-row { display: flex; gap: 0.6rem; max-width: 640px; }
.search-row input[type="search"] {
  flex: 1;
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.8rem 1.1rem;
}

.results-summary {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}

/* ── pagination ── */
.pagination {
  display: flex;
  gap: 0.6rem;
  margin-top: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.page-info { font-size: 0.88rem; color: var(--muted); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════
   Item detail — journal article layout
   ══════════════════════════════════════════════════════════════════════ */
.item-detail { max-width: 78ch; margin: 0 auto; }

.item-detail-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--line);
}
.item-detail-header h1 {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.45rem);
  margin-bottom: 0.6rem;
  line-height: 1.2;
}
.item-authors {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0.4rem 0 1.4rem;
}
.author-sep { color: var(--muted); padding: 0 0.15rem; }

.item-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.7rem 2rem;
  font-size: 0.9rem;
  margin: 1.5rem 0 0;
  padding: 1.5rem 1.65rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}
.item-facts dt {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.74rem;
  align-self: center;
}
.item-facts dd {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 500;
}
.keywords { font-style: italic; color: var(--muted); }

.item-abstract h2,
.item-download h2,
.item-permalink h2,
.item-cite h2 {
  font-size: 1.05rem;
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--line-soft);
  margin-bottom: 1rem;
}
.item-abstract p {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.item-download p { margin-top: 0.85rem; font-size: 0.92rem; }

/* ── tombstone ── */
.tombstone {
  background: #fff5f4;
  border: 1px solid #fad9d6;
  border-left: 4px solid var(--red);
  border-radius: var(--r);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2rem;
  color: #8d1610;
  font-size: 0.95rem;
}
.tombstone strong { color: var(--red-600); }

/* ── permalink ── */
.permalink-block {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.6rem;
  word-break: break-all;
}
.permalink-block code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 600;
}
.permalink-note { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* ── citation ── */
.cite-block {
  background: var(--navy);
  border: 1px solid var(--navy-700);
  color: #e8edf7;
  border-radius: var(--r);
  padding: 1.15rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  margin: 0.6rem 0 1.5rem;
  box-shadow: var(--sh-sm);
}

/* ══════════════════════════════════════════════════════════════════════
   Accessibility
   ══════════════════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

/* ══════════════════════════════════════════════════════════════════════
   Alerts
   ══════════════════════════════════════════════════════════════════════ */
.alert {
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: var(--r);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  background: var(--paper);
  box-shadow: var(--sh-xs);
  font-size: 0.95rem;
}
.alert p:first-child { margin-top: 0; }
.alert p:last-child { margin-bottom: 0; }
.alert ul { margin: 0.7rem 0 0; padding-left: 1.2rem; }

.alert-success { border-left-color: #0e9f6e; background: #f0fdf7; color: #07623f; }
.alert-error   { border-left-color: var(--red); background: #fff5f4; color: #8d1610; }
.alert-warning { border-left-color: #d97706; background: #fffaf0; color: #7c3a06; }
.alert-info    { border-left-color: var(--blue); background: var(--blue-050); color: #1a2f8f; }

/* ══════════════════════════════════════════════════════════════════════
   Forms — public submit / resubmit
   ══════════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  color: var(--ink);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 0.95rem;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  transition: var(--t);
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 255, 0.13);
}
.form-group textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.form-group small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  font-weight: 500;
}

.form-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1 1 200px; }

.form-actions {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.65rem;
  margin-bottom: 2rem;
  background: var(--paper);
  box-shadow: var(--sh-sm);
}
legend {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  padding: 0 0.6rem;
}
fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}
fieldset label input[type="radio"] { width: 1rem; height: 1rem; accent-color: var(--blue); }

.required { color: var(--red); font-weight: 700; margin-left: 0.15rem; }
.word-count-hint { font-weight: 500; font-size: 0.8rem; color: var(--muted); }

/* ── author table ── */
.author-table { margin-bottom: 1rem; }
.author-header,
.author-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1.5fr;
  gap: 0.75rem;
}
.author-header {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
  padding: 0 0.5rem;
}
.author-row { margin-bottom: 0.7rem; }
.author-row input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 0.9rem;
  font-family: var(--sans);
  transition: var(--t);
}
.author-row input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 255, 0.1);
}
.author-controls { margin-top: 1rem; display: flex; gap: 0.7rem; }
.author-controls button { font-size: 0.8rem; padding: 0.5rem 1rem; }

/* ══════════════════════════════════════════════════════════════════════
   Tracking page
   ══════════════════════════════════════════════════════════════════════ */
.track-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  background: var(--paper);
  box-shadow: var(--sh-sm);
  border-top: 4px solid var(--blue);
}
.track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.track-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--navy);
  line-height: 1.3;
}
.track-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
  font-size: 0.94rem;
}
.track-meta dt { color: var(--muted); font-weight: 600; font-family: var(--sans); }
.track-meta dd { margin: 0; color: var(--ink); font-weight: 500; }
.track-url {
  margin-top: 1.25rem;
  color: var(--muted);
  background: var(--paper-2);
  padding: 0.75rem 1rem;
  border-radius: var(--r);
  border: 1px dashed var(--line);
  font-size: 0.9rem;
}

/* ── status badges (tracking) ── */
.status-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.status-draft             { background: var(--paper-3); color: #475569; }
.status-pending           { background: var(--blue-050); color: var(--blue); }
.status-under_review      { background: #fef6d8; color: #8a5a08; }
.status-changes_requested { background: #ffe2cc; color: #b3500f; }
.status-approved          { background: #d6f5e6; color: #07623f; }
.status-published         { background: #d6f5e3; color: #157a3a; }
.status-rejected          { background: #fcdedb; color: #aa1208; }
.status-withdrawn         { background: var(--paper-3); color: #647389; }

/* ══════════════════════════════════════════════════════════════════════
   Responsive — public
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html { font-size: 15px; }
  .container { padding: 0 1.15rem; }
  main, main.container { padding: 2.25rem 1.15rem 3rem; }
  h2 { font-size: 1.35rem; }
  .header-inner { padding: 0.8rem 0; }
  header nav { justify-content: flex-start; gap: 0; }
  header nav a { padding: 0.45rem 0.6rem; font-size: 0.76rem; }
  .page-hero { padding: 1.5rem 0 1.5rem 1.25rem; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row select { width: 100%; }
  .item-facts { grid-template-columns: 1fr; gap: 0.35rem; }
  .item-facts dt { margin-top: 0.6rem; }
  .author-header { display: none; }
  .author-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    border: 1px solid var(--line);
    padding: 1rem;
    border-radius: var(--r);
    background: var(--paper-2);
    margin-bottom: 1rem;
  }
  .track-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ══════════════════════════════════════════════════════════════════════
   Print — clean academic article output
   ══════════════════════════════════════════════════════════════════════ */
@media print {
  header, footer, .item-download, .item-cite { display: none; }
  body { background: #fff; }
  .item-facts { box-shadow: none; }
  a { color: var(--ink); text-decoration: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════════════════════ */
.admin-body {
  background: var(--paper-3);
  font-family: var(--sans);
  color: var(--ink);
}

.admin-wrap { display: flex; min-height: 100vh; }

/* ── sidebar ── */
.admin-sidebar {
  width: 256px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 2px 0 24px -12px rgba(0, 22, 65, 0.6);
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-brand {
  padding: 1.5rem 1.5rem 1.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.admin-brand::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--red) 100%);
}
.admin-brand-link {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.admin-brand-link::before {
  content: "U";
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}
.admin-brand-link:hover { color: #fff; text-decoration: none; }

.admin-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: 0.1rem;
}
.admin-nav a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 0.7rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--t);
  border-left: 3px solid transparent;
}
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding-left: 1.7rem;
}
.admin-nav a.active {
  background: rgba(0, 51, 255, 0.18);
  color: #fff;
  border-left-color: var(--blue);
  font-weight: 700;
}

.admin-sidebar-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.15);
}
.admin-user-info { line-height: 1.5; display: block; margin-bottom: 0.6rem; font-weight: 600; }
.admin-user-info small {
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

/* ── content ── */
.admin-content { flex: 1; padding: 2.5rem 3rem; min-width: 0; }

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: 1.1rem;
  border-bottom: 2px solid var(--line);
}
.admin-page-header h1 {
  margin: 0;
  font-size: 1.7rem;
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.admin-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--sh-sm);
}
.admin-section h2 {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  font-family: var(--sans);
  border-bottom: 2px solid var(--line-soft);
  padding-bottom: 0.6rem;
}

/* ── tables ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  background: var(--paper-2);
  border-bottom: 2px solid var(--line);
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.74rem;
}
.admin-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  color: var(--ink);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background var(--t); }
.admin-table tr:hover td { background: var(--paper-2); }
.admin-table-sm { font-size: 0.82rem; }
.admin-table-sm td { padding: 0.55rem 0.75rem; }
.row-deactivated td { opacity: 0.5; background: var(--paper-2); }

/* ── badges ── */
.badge {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.badge-pending   { background: var(--blue-050); color: var(--blue); }
.badge-review    { background: #fef6d8; color: #8a5a08; }
.badge-changes   { background: #ffe2cc; color: #b3500f; }
.badge-published { background: #d6f5e3; color: #157a3a; }
.badge-closed    { background: var(--paper-3); color: #475569; }
.badge-default   { background: var(--paper-3); color: #334155; }
.badge-role-editor    { background: #efe9ff; color: #5b28c4; }
.badge-role-moderator { background: #dcefff; color: #0a5fae; }

/* ── admin buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.52rem 1.05rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: var(--t);
  box-shadow: var(--sh-xs);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.btn-primary  { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover  { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-success  { background: #0e9f6e; color: #fff; border-color: #0e9f6e; }
.btn-success:hover  { background: #0a7d56; border-color: #0a7d56; }
.btn-warning  { background: #d97706; color: #fff; border-color: #d97706; }
.btn-warning:hover  { background: #b45309; border-color: #b45309; }
.btn-danger   { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover   { background: var(--red-600); border-color: var(--red-600); }
.btn-outline  { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-outline:hover  { background: var(--paper-2); border-color: #cdd5e2; color: var(--navy); }
.btn-sm { padding: 0.32rem 0.65rem; font-size: 0.77rem; }

/* ── flash ── */
.flash-banner {
  background: #d6f5e3;
  color: #157a3a;
  border: 1px solid #aae5c2;
  border-left: 4px solid #0e9f6e;
  border-radius: var(--r);
  padding: 0.8rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--sh-xs);
}

/* ── auth card ── */
.auth-card {
  max-width: 420px;
  margin: 6vh auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  box-shadow: var(--sh-lg);
  border-top: 4px solid var(--blue);
}
.auth-card h1 {
  margin: 0 0 1.75rem;
  font-size: 1.45rem;
  text-align: center;
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 800;
}

/* ── admin inputs ── */
.input-text {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  transition: var(--t);
}
.input-text:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 255, 0.13);
}
.input-select {
  padding: 0.6rem 2rem 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23647389' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.9rem;
  transition: var(--t);
}
.input-select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 255, 0.13);
}
.input-mono { font-family: var(--mono); font-size: 0.82rem; }
.input-hint { font-size: 0.77rem; color: var(--muted); margin-top: 0.35rem; font-weight: 500; }

.form-errors {
  background: #fcdedb;
  color: #8d1610;
  border: 1px solid #f4b3ac;
  border-left: 4px solid var(--red);
  border-radius: var(--r);
  padding: 0.8rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.form-errors p { margin: 0 0 0.25rem; }
.form-errors p:last-child { margin: 0; }

/* ── admin search / inline forms ── */
.admin-search-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.admin-search-form .input-text { max-width: 300px; }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form .input-text { max-width: 220px; }

.action-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.action-row form { display: flex; flex-direction: column; gap: 0.5rem; }
.action-row .form-with-note { min-width: 250px; }
.action-row-sm { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.form-with-note { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── admin item two-column ── */
.admin-item-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}
.admin-item-main { min-width: 0; }
.admin-item-aside { min-width: 0; }
@media (max-width: 992px) {
  .admin-item-layout { grid-template-columns: 1fr; }
}

dl.file-info {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  margin: 0;
}
dl.file-info dt { font-weight: 700; color: var(--ink-soft); }
dl.file-info dd { margin: 0; word-break: break-all; color: var(--ink); }

.pdf-preview-wrap {
  margin-top: 1.25rem;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.pdf-preview {
  width: 100%;
  height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.checklist-item { margin-bottom: 0.5rem; font-size: 0.9rem; }
.checklist-item label { display: flex; gap: 0.5rem; align-items: center; cursor: pointer; font-weight: 500; }
.checklist-item input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--blue); }

.item-meta-line {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ── admin responsive ── */
@media (max-width: 768px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .admin-brand { border-bottom: none; flex: 1 1 auto; }
  .admin-brand::after { display: none; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; padding: 0.5rem 1rem; flex: 1 1 100%; }
  .admin-nav a { border-left: none; padding: 0.5rem 0.8rem; border-radius: var(--r-sm); }
  .admin-nav a:hover { padding-left: 0.8rem; }
  .admin-sidebar-footer { flex: 1 1 100%; }
  .admin-content { padding: 2rem 1.25rem; }
  .admin-page-header h1 { font-size: 1.4rem; }
}
