:root {
  --navy: #0b2340;
  --navy-2: #14325a;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --line: #e5e1d8;
  --bg: #ffffff;
  --bg-alt: #f6f3ec;
  --bg-dark: #0b2340;
  --accent: #b89453;
  --accent-2: #9a7a3f;
  --brand-green: #0e3527;
  --brand-red: #c8102e;
  --radius: 10px;
  --maxw: 1140px;
  --shadow-sm: 0 1px 2px rgba(11, 35, 64, .06), 0 2px 8px rgba(11, 35, 64, .04);
  --shadow-md: 0 6px 24px rgba(11, 35, 64, .10);
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); text-decoration-color: var(--accent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.sr, .skip { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { left: 1rem; top: 1rem; width: auto; height: auto; padding: .75rem 1rem; background: var(--navy); color: #fff; z-index: 100; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.brand-logo {
  height: 42px; width: auto;
  display: block;
  flex: 0 0 auto;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 8px;
  background: #fff; color: var(--brand-green);
  font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem;
  line-height: 1;
}
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.3rem; letter-spacing: .02em; }
.brand-sub {
  font-size: .78rem; color: var(--muted);
  padding-left: .85rem;
  border-left: 1px solid var(--line);
  line-height: 1.2;
}

.primary-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a { text-decoration: none; color: var(--ink); font-weight: 500; padding: .4rem 0; position: relative; white-space: nowrap; }
.primary-nav a:hover { color: var(--navy); }
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.primary-nav a:hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    box-shadow: var(--shadow-md);
  }
  .primary-nav.open { max-height: 80vh; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .primary-nav li { border-bottom: 1px solid var(--line); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { display: block; padding: 1rem 0; }
  .primary-nav a::after { display: none; }
  .primary-nav .nav-intern { display: block; line-height: inherit; }
  .brand-sub { display: none; }
  .brand-logo { height: 36px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(184,148,83,.14), transparent 60%),
    radial-gradient(1000px 500px at -10% 10%, rgba(11,35,64,.07), transparent 55%),
    linear-gradient(180deg, #fbf9f3, #ffffff 60%);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  display: inline-block;
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .78rem; color: var(--accent-2); margin: 0 0 1rem;
  padding: .35rem .7rem; background: rgba(184,148,83,.10);
  border: 1px solid rgba(184,148,83,.25);
  border-radius: 999px;
}
.hero h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08;
  letter-spacing: -.01em; margin: 0 0 1.25rem; color: var(--navy);
  max-width: 22ch;
}
.hero .accent { color: var(--accent-2); font-style: italic; font-weight: 500; }
.lead { font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--ink); max-width: 64ch; margin: 0 0 1.75rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 3rem; }
.btn {
  display: inline-block; padding: .85rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-2); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(11,35,64,.25); }
.btn-ghost:hover { color: var(--navy); border-color: var(--accent); background: #fff; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin: 0; padding: 1.5rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.stats > div { text-align: left; padding: .25rem .5rem; }
.stats dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.stats dd { font-family: var(--font-serif); font-size: 1.5rem; color: var(--navy); margin: .25rem 0 0; font-weight: 600; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--bg-dark); color: #e8ecf5; }
.section-dark a { color: #fff; }
.section-dark .section-label { color: var(--accent); }
.section-dark h2 { color: #fff; }

.section-label {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: .78rem; color: var(--accent-2); margin: 0 0 .75rem; font-weight: 600;
}
h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15;
  letter-spacing: -.005em; color: var(--navy); margin: 0 0 1rem;
  max-width: 24ch;
}
.section-head { margin-bottom: 2.5rem; max-width: 720px; }
.section-intro { color: var(--muted); font-size: 1.05rem; margin: .5rem 0 0; }
.section-footnote { margin-top: 2rem; color: var(--muted); font-size: .92rem; }

.cols { display: grid; grid-template-columns: 1fr 2fr; gap: 2.5rem; align-items: start; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; gap: 1.25rem; } }
.col-body p + p { margin-top: 1em; }

.section-cta { margin-top: 2rem; }
.link-arrow { text-decoration: none; font-weight: 600; color: var(--navy); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.link-arrow:hover { color: var(--accent-2); }
.section-dark .link-arrow { color: #fff; border-color: var(--accent); }

/* ---------- Papers ---------- */
.papers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.paper {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.paper:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(184,148,83,.5); }
.paper-link, .paper-link:link, .paper-link:visited, .paper-link:hover, .paper-link:focus, .paper-link:active { display: block; color: inherit; text-decoration: none; }
.paper-link * { text-decoration: none; }
.paper-link:hover h3 { color: var(--accent-2); }

/* ---------- PDF modal ---------- */
.pdf-modal { border: 0; padding: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(11,35,64,.35); width: min(1100px, 92vw); height: min(86vh, 900px); background: #fff; overflow: hidden; }
.pdf-modal::backdrop { background: rgba(11,35,64,.55); }
.pdf-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: #fff; }
.pdf-modal-title { font-family: var(--font-serif); font-weight: 600; font-size: 1rem; color: var(--navy); margin: 0; line-height: 1.35; }
.pdf-modal-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.pdf-modal-actions a, .pdf-modal-actions button { font: inherit; font-size: .85rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--navy); cursor: pointer; text-decoration: none; }
.pdf-modal-actions a:hover, .pdf-modal-actions button:hover { border-color: var(--accent); }
.pdf-modal-body { width: 100%; height: calc(100% - 3.25rem); }
.pdf-modal-body iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 600px) {
  .pdf-modal { width: 100vw; height: 100vh; max-width: none; border-radius: 0; }
}

/* ---------- Archive page ---------- */
.archive-head { margin-bottom: 1.25rem; }
.archive-controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: .75rem 0 1.25rem; }
.archive-controls input[type="search"] { flex: 1 1 260px; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; color: var(--navy); background: #fff; }
.archive-controls input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.archive-count { color: var(--muted); font-size: .9rem; }
.paper.hidden { display: none; }

/* ---------- Intern: Nav link highlight ---------- */
.primary-nav .nav-intern { display: inline-block; line-height: 1.2; border: 1px solid var(--accent); color: var(--accent-2); padding: .3rem .75rem; border-radius: 999px; }
.primary-nav .nav-intern::after { display: none; }
.primary-nav .nav-intern:hover { background: var(--accent); color: #fff; }

/* Pill-style toggle buttons that match the .nav-intern look */
.btn-pill {
  display: inline-block; line-height: 1.2;
  border: 1px solid var(--accent); color: var(--accent-2);
  padding: .4rem 1rem; border-radius: 999px;
  background: transparent; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn-pill:hover { background: var(--accent); color: #fff; }
.btn-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Working Papers: year-filter chips + search */
.papers-controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0 1.25rem; }
.papers-years { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1 1 auto; }
.papers-years .year-chip {
  display: inline-block; line-height: 1.2;
  border: 1px solid var(--accent); color: var(--accent-2);
  padding: .3rem .75rem; border-radius: 999px;
  background: transparent; font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer;
}
.papers-years .year-chip:hover { background: rgba(184, 148, 83, .12); }
.papers-years .year-chip.is-active { background: var(--accent); color: #fff; }
.papers-years .year-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.papers-search {
  flex: 0 1 280px; min-width: 200px;
  padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font: inherit;
}
.papers-search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.papers-empty { color: var(--muted); font-style: italic; margin: 1rem 0; }
.papers-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; }

.link-like { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.link-like:hover { color: var(--accent-2); }

/* ---------- Login page (QMC-style layout, arqus palette) ---------- */
.login-page { background: #eef1f4; min-height: 100vh; font-family: var(--font-sans); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card {
  width: 100%; max-width: 460px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(11, 35, 64, .08), 0 2px 8px rgba(11, 35, 64, .04);
  padding: 3rem 3rem 2.5rem;
}
.login-logo {
  font-family: var(--font-sans);
  color: var(--accent);
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 1rem;
  letter-spacing: -.01em;
  line-height: 1;
}
.login-sub {
  text-align: center;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 2.5rem;
}
.login-card .field { display: block; margin-bottom: 1.25rem; }
.login-card .field > span {
  display: block;
  color: var(--accent);
  font-size: .85rem;
  margin-bottom: .35rem;
  font-weight: 500;
}
.login-card input[type="text"], .login-card input[type="password"] {
  width: 100%;
  padding: .8rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--navy);
  background: #e9eefa;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.login-card input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(184, 148, 83, .18);
}
.login-btn {
  width: 100%;
  margin-top: 1rem;
  padding: .95rem 1rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .01em;
  transition: background .15s;
}
.login-btn:hover { background: var(--accent-2); }
.login-error {
  background: #fdecec;
  color: #9a2222;
  border: 1px solid #f3c8c8;
  padding: .55rem .75rem;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.login-back { text-align: center; margin: 1.75rem 0 0; font-size: .85rem; }
.login-back a { color: var(--muted); text-decoration: none; }
.login-back a:hover { color: var(--navy); }
@media (max-width: 500px) {
  .login-card { padding: 2.25rem 1.5rem 2rem; border-radius: 12px; }
  .login-logo { font-size: 2.6rem; }
}

/* ---------- Intern dashboard + upload areas ---------- */
[hidden] { display: none !important; }
.intern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.intern-card {
  display: block; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: var(--navy); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.intern-card[hidden] { display: none; }
.intern-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(184,148,83,.5); }
.intern-card-tag { display: inline-block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; margin-bottom: .5rem; }
.intern-card h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; margin: 0 0 .5rem; color: var(--navy); }
.intern-card p { margin: 0 0 .75rem; color: var(--muted); font-size: .95rem; }

/* dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
  padding: 2rem 1rem; border: 2px dashed var(--accent); border-radius: var(--radius);
  background: #fffaf1; color: var(--navy); cursor: pointer; margin: 1rem 0; text-align: center;
  transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone:focus { background: #fff3dd; outline: none; }
.dropzone.dragover { background: #fff3dd; border-color: var(--navy); }
.dropzone p { margin: 0; }
.dz-hint { color: var(--muted); font-size: .85rem; }

.upload-progress { display: flex; flex-direction: column; gap: .5rem; margin: .5rem 0; }
.upload-progress .item { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .85rem; }
.upload-progress .item .n { font-weight: 600; color: var(--navy); }
.upload-progress .item .status { float: right; color: var(--muted); font-size: .85rem; }
.upload-progress .item.ok .status { color: #2a7a3e; }
.upload-progress .item.err .status { color: #9a2222; }
.upload-progress .bar-wrap { height: 6px; background: #eee; border-radius: 4px; margin-top: .4rem; overflow: hidden; }
.upload-progress .bar { height: 100%; width: 0%; background: var(--accent); transition: width .15s; }

.file-list-head { font-family: var(--font-serif); color: var(--navy); margin: 1.5rem 0 .5rem; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .75rem;
  padding: .55rem .25rem; border-bottom: 1px solid var(--line);
}
.file-list li.empty { color: var(--muted); display: block; padding: .75rem 0; }
.file-list .fn { color: var(--navy); text-decoration: none; font-weight: 500; word-break: break-all; }
.file-list .fn:hover { color: var(--accent-2); text-decoration: underline; }
.file-list .meta { color: var(--muted); font-size: .85rem; }
.file-list .del { background: #fff; border: 1px solid var(--line); color: var(--muted); padding: .2rem .6rem; border-radius: 6px; font-size: .8rem; cursor: pointer; }
.file-list .del:hover { color: #9a2222; border-color: #e8b8b8; }
@media (max-width: 600px) {
  .file-list li { grid-template-columns: 1fr auto; }
  .file-list .del { grid-column: 1 / -1; justify-self: start; }
}
.paper-no { display: inline-block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.paper h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; margin: .4rem 0 .6rem; color: var(--navy); line-height: 1.3; }
.paper-meta { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Intern: folder grid (QMC-style) ---------- */
.folders-head {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.folders-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.folders-head .section-label { display: block; }
.folders-head .section-intro {
  max-width: 640px;
  margin: .75rem auto 0;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.folder-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 2rem 1rem; }

.folder-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem;
  padding: 1.75rem 1rem 1.25rem;
  min-height: 170px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.folder-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(184, 148, 83, .5); }
.folder-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.folder-tile .folder-icon {
  width: 56px; height: 56px;
  color: var(--accent);
}
.folder-tile .folder-name {
  font-weight: 700;
  color: var(--navy);
  word-break: break-word;
  line-height: 1.25;
  max-width: 100%;
}
.folder-tile .folder-sub {
  color: var(--ink);
  font-size: .95rem;
  margin-top: -.15rem;
  line-height: 1.25;
  word-break: break-word;
  max-width: 100%;
}
.folder-tile .folder-meta {
  color: var(--muted);
  font-size: .82rem;
}

/* Read-only state */
.read-only-note {
  color: var(--ink);
  background: #fbf5e8;
  border-left: 3px solid var(--accent);
  padding: .55rem .9rem;
  border-radius: 6px;
  margin-top: .75rem;
}
.folder-tile .folder-del {
  position: absolute; top: .45rem; right: .45rem;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--muted); cursor: pointer;
  opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.folder-tile .folder-del svg { width: 18px; height: 18px; }
.folder-tile:hover .folder-del,
.folder-tile:focus-within .folder-del { opacity: 1; }
.folder-tile .folder-del:hover { color: #9a2222; background: #fbeaea; }

.docs-header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; }
.docs-header-row .file-list-head { margin: 0; }

.program-section { margin: 1.25rem 0 1.75rem; padding: 1rem 1.25rem; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; }
.program-section .file-list-head { margin-top: 0; }
.program-section .section-intro { font-size: .9rem; color: #475569; margin: .25rem 0 .75rem; }
.program-section .program-status { margin: 0 0 .75rem; font-size: .95rem; }
.program-section .program-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.program-section .program-progress { color: #475569; font-size: .9rem; }
.btn.btn-secondary { background: #fff; color: #0b2340; border: 1px solid #cbd5e1; border-radius: 8px; padding: .5rem 1rem; cursor: pointer; font: inherit; font-weight: 600; }
.btn.btn-secondary:hover { background: #f1f5f9; }

.folder-tile .folder-edit {
  position: absolute; top: .45rem; right: 2.6rem;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--muted); cursor: pointer;
  opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.folder-tile .folder-edit svg { width: 18px; height: 18px; }
.folder-tile:hover .folder-edit,
.folder-tile:focus-within .folder-edit { opacity: 1; }
.folder-tile .folder-edit:hover { color: var(--accent-2); background: rgba(184, 148, 83, .12); }

/* Floating Action Button */
.fab {
  position: fixed;
  right: clamp(1rem, 3vw, 2.25rem);
  bottom: clamp(1rem, 3vw, 2.25rem);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 0;
  box-shadow: 0 6px 16px rgba(11, 35, 64, .22), 0 2px 4px rgba(11, 35, 64, .15);
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 60;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.fab:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(11, 35, 64, .26); }
.fab:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 4px var(--accent); }
.fab svg { width: 26px; height: 26px; }

/* Folder detail crumbs */
.crumbs { margin: 0 0 1rem; }
.crumbs .link-like { color: var(--navy); font-weight: 600; }
.crumbs .link-like:hover { color: var(--accent-2); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--accent); padding-left: 1.25rem; }
.timeline li { display: block; padding: 0; border-bottom: 1px dashed var(--line); }
.timeline li[hidden] { display: none; }
.timeline li:last-child { border-bottom: 0; }
.tagung-head {
  display: grid; grid-template-columns: 5rem 1fr auto; gap: .1rem 1rem; align-items: baseline;
  width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0;
  padding: .55rem 0; cursor: pointer;
}
.tagung-head:hover:not(.is-disabled) .city,
.tagung-head:focus-visible:not(.is-disabled) .city { color: var(--accent); }
.tagung-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.tagung-head .year { font-family: var(--font-serif); font-weight: 600; color: var(--navy); font-size: 1.15rem; grid-row: 1; align-self: baseline; }
.tagung-head .city { grid-row: 1; font-weight: 600; color: var(--navy); transition: color .15s ease; }
.tagung-head .host { grid-column: 2; grid-row: 2; font-size: .9rem; color: var(--muted); line-height: 1.25; }
.tagung-head .chev { grid-column: 3; grid-row: 1 / span 2; align-self: center; color: var(--accent); font-size: 1rem; transition: transform .18s ease; }
.timeline-more { margin: 1rem 0 0; }
.timeline-more button.link-arrow { background: transparent; padding: 0 0 2px; font: inherit; font-weight: 600; cursor: pointer; }
.timeline-more button.link-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tagung-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.tagung-head.is-disabled { cursor: default; opacity: .75; }
.tagung-details { padding: .25rem 0 1rem; color: var(--ink); font-size: .95rem; line-height: 1.55; max-width: 62ch; }
.tagung-details p { margin: 0 0 .6rem; }
.tagung-details p:last-child { margin-bottom: 0; }
.tagung-details a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; }
.tagung-details a:hover { color: var(--accent); }
@media (max-width: 520px) {
  .tagung-head { grid-template-columns: 4rem 1fr auto; }
}

/* ---------- Prize ---------- */
.prize-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 800px) { .prize-grid { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.card-info { background: var(--navy); color: #e8ecf5; border-color: var(--navy); }
.card-info a { color: #fff; }
.card-info .card-kicker { color: var(--accent); }
.card-kicker { margin: 0 0 1rem; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.prize-list { list-style: none; margin: 0; padding: 0; }
.prize-list li { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.prize-list li:last-child { border-bottom: 0; }
.prize-list strong { font-family: var(--font-serif); font-size: 1.15rem; color: var(--navy); }
.facts { list-style: none; padding: 0; margin: 0 0 1rem; }
.facts li { padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.facts li:last-child { border-bottom: 0; }

/* Prize section heading with PwC logo */
.prize-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; max-width: 100%; }
.prize-head-text { flex: 1 1 auto; min-width: 0; }
.prize-head .section-intro { margin-top: .5rem; }
.prize-logo {
  flex: 0 0 auto;
  width: 88px; height: auto;
  margin-top: .25rem;
  background: #fff;
  padding: .5rem .6rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .prize-head { flex-direction: column-reverse; gap: 1rem; }
  .prize-logo { width: 72px; }
}

/* Prize details prose */
.prize-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 800px) { .prize-details { grid-template-columns: 1fr; gap: 1rem; } }
.prize-details-col p { margin: 0 0 .9rem; color: var(--ink); }
.prize-details-col p:last-child { margin-bottom: 0; }
.prize-subhead {
  margin: 0 0 .75rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy);
}

/* Prize disclosure ("Weitere Informationen …") */
.prize-more { margin-top: 2.25rem; }
.prize-more summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--navy);
  font-weight: 600;
  padding: .15rem 0 .2rem;
  border-bottom: 2px solid var(--accent);
  transition: color .15s ease;
}
.prize-more summary::-webkit-details-marker { display: none; }
.prize-more summary::after {
  content: '';
  width: .55rem; height: .55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.prize-more[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.prize-more summary:hover,
.prize-more summary:focus-visible { color: var(--accent-2, #8a6a3a); outline: none; }
.prize-more[open] > .prize-details { margin-top: 1.5rem; }

/* Jury block — prominent card */
.jury-block {
  margin-top: 2.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
}
.jury-block .card-kicker {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: .85rem;
  color: var(--navy);
}
.jury-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .85rem 1.75rem;
}
.jury-list li {
  display: flex;
  flex-direction: column;
  padding: .15rem 0;
  border-left: 2px solid transparent;
  padding-left: .9rem;
}
.jury-list li.is-chair { border-left-color: var(--accent); }
.jury-name { font-weight: 600; color: var(--navy); line-height: 1.25; }
.jury-chair { color: var(--muted); font-size: .9rem; margin-top: .1rem; }
.jury-badge {
  display: inline-block;
  margin-left: .4rem;
  padding: .08rem .5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* Winners block */
.winners-block { margin-top: 3rem; }
.winners-title {
  font-family: var(--font-serif); color: var(--navy);
  margin: 0 0 1.25rem; font-size: 1.35rem; font-weight: 600;
}
.winners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) { .winners-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .winners-grid { grid-template-columns: 1fr; } }

.winners-older { margin-top: 1.25rem; }
.winners-older[hidden] { display: none; }

.winner-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.25rem 1rem;
}
.winner-year {
  margin: 0 0 .6rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: .15rem;
  line-height: 1;
}
.winner-cat + .winner-cat { margin-top: .85rem; }
.winner-cat-label {
  margin: .75rem 0 .3rem;
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.winner-list {
  list-style: none; margin: 0; padding: 0;
}
.winner-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .5rem;
  padding: .35rem 0;
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.winner-list.ranked li { grid-template-columns: 1.5rem 1fr; }
.winner-list li:last-child { border-bottom: 0; }
.winner-list .rank {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-2);
  font-size: 1rem;
}
.winner-list .person {
  grid-column: 2; grid-row: 1;
  font-weight: 600; color: var(--navy);
}
.winner-list:not(.ranked) .person { grid-column: 1 / -1; grid-row: 1; }
.winner-list .uni {
  grid-column: 2; grid-row: 2;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.3;
}
.winner-list:not(.ranked) .uni { grid-column: 1 / -1; grid-row: 2; }
.winner-mention {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .85rem;
  font-style: italic;
}

.winners-more {
  margin: 1.5rem 0 0;
  text-align: center;
}
.winners-more button.link-arrow {
  background: transparent; padding: 0 0 2px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.winners-more button.link-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Members ---------- */
.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem 1.25rem; }
.members li { padding: 0; background: transparent; border: 0; }
.member-card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.member-card:hover, .member-card:focus-visible { transform: translateY(-1px); box-shadow: 0 6px 18px -10px rgba(11,35,64,.25); border-color: var(--accent); outline: none; }
.member-card strong { display: block; color: var(--navy); font-weight: 600; font-size: .98rem; }
.member-card span { display: block; color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.member-link { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); cursor: pointer; border-bottom: 1px dotted var(--accent); }
.member-link:hover, .member-link:focus-visible { color: var(--accent); outline: none; }

/* ---------- Member modal ---------- */
.member-modal { border: 0; padding: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(11,35,64,.35); width: min(720px, 92vw); max-height: 86vh; background: #fff; overflow: hidden; }
.member-modal::backdrop { background: rgba(11,35,64,.55); }
.member-modal-close { position: absolute; top: .5rem; right: .6rem; background: transparent; border: 0; color: var(--navy); font-size: 1.6rem; line-height: 1; width: 2rem; height: 2rem; border-radius: 50%; cursor: pointer; }
.member-modal-close:hover { color: var(--accent); background: rgba(11,35,64,.06); }
.member-modal-body { display: grid; grid-template-columns: 220px 1fr; gap: 0; max-height: 86vh; overflow: auto; }
.member-modal-photo-wrap { background: #f3f5f9; display: flex; align-items: flex-start; justify-content: center; padding: 1.5rem; border-right: 1px solid var(--line); }
.member-modal-photo-wrap img { width: 100%; max-width: 180px; height: auto; border-radius: 6px; display: block; background: #fff; }
.member-modal-info { padding: 1.5rem 1.75rem; color: var(--ink); }
.member-modal-kicker { margin: 0 0 .25rem; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--accent); }
.member-modal-info h3 { margin: 0 0 .5rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; color: var(--navy); line-height: 1.25; }
.member-modal-affil { margin: 0 0 1rem; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.member-modal-affil span { display: block; }
.member-modal-affil span:first-child { color: var(--navy); }
.member-modal-facts { margin: 0; padding: .75rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .6rem; }
.member-modal-facts > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; align-items: baseline; }
.member-modal-facts dt { margin: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--accent); }
.member-modal-facts dd { margin: 0; font-size: .95rem; word-break: break-word; }
.member-modal-facts a { color: var(--navy); text-decoration: none; border-bottom: 1px solid transparent; }
.member-modal-facts a:hover { border-bottom-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) {
  .member-modal-body { grid-template-columns: 1fr; }
  .member-modal-photo-wrap { border-right: 0; border-bottom: 1px solid var(--line); padding: 1rem; }
  .member-modal-photo-wrap img { max-width: 140px; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
address { font-style: normal; line-height: 1.7; color: #e8ecf5; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.12); display: grid; grid-template-columns: 9rem 1fr; gap: .5rem; align-items: baseline; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list span { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; color: var(--accent); }
.contact-list a { color: #fff; text-decoration: none; border-bottom: 1px solid transparent; }
.contact-list a:hover { border-bottom-color: var(--accent); }
@media (max-width: 480px) { .contact-list li { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #081b31; color: #c9d2e0; padding: 2.5rem 0; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: .75rem; color: #fff; }
.footer-brand small { color: #99a4b8; }
.footer-links { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; justify-self: center; }
.footer-links a { color: #c9d2e0; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-note { margin: 0; color: #8793a8; font-size: .82rem; grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-links { justify-self: start; flex-wrap: wrap; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 4rem 0; max-width: 760px; }
.legal h1 { font-family: var(--font-serif); color: var(--navy); margin-top: 0; font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal p { color: var(--ink); }

/* ---------- Tagung dialog (new-tagung form) ---------- */
.tagung-dialog {
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: 460px;
  width: calc(100% - 2rem);
  box-shadow: 0 30px 60px -20px rgba(11, 35, 64, .35), 0 2px 0 rgba(11, 35, 64, .04);
  background: #fff;
  color: var(--ink);
}
.tagung-dialog::backdrop { background: rgba(11, 35, 64, .45); }
.tagung-dialog form {
  padding: 1.6rem 1.6rem 1.25rem;
  display: grid;
  gap: .85rem;
  margin: 0;
}
.tagung-dialog h3 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 1.35rem;
  margin: 0;
}
.tagung-dialog .dialog-intro {
  margin: -.4rem 0 .25rem;
  color: #5a6778;
  font-size: .9rem;
}
.tagung-dialog label {
  display: grid;
  gap: .25rem;
  font-size: .88rem;
  color: #34405a;
  font-weight: 600;
}
.tagung-dialog label > span { letter-spacing: .01em; }
.tagung-dialog input {
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid #c8d0de;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.tagung-dialog input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 35, 64, .12);
}
.tagung-dialog .dialog-error {
  margin: 0;
  padding: .55rem .7rem;
  background: #fdecec;
  border: 1px solid #f5c2c2;
  color: #8a1f1f;
  border-radius: 8px;
  font-size: .88rem;
}
.tagung-dialog .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding: 0;
  margin: .5rem 0 0;
  list-style: none;
}
.tagung-dialog .dialog-actions button {
  font: inherit;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid #c8d0de;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.tagung-dialog .dialog-actions button:hover { background: #f4f6fb; }
.tagung-dialog .dialog-actions button.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}
.tagung-dialog .dialog-actions button.primary:hover { background: #14304f; border-color: #14304f; }

/* Working papers (intern) list + upload */
.paper-upload-box {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin: 0 0 1rem;
}
.paper-count { color: var(--muted); font-size: .9rem; }
.paper-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  counter-reset: none;
}
.paper-list .empty {
  list-style: none;
  padding: 1rem;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}
.paper-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 .5rem;
  padding: 0;
  transition: border-color .15s, box-shadow .15s;
}
.paper-item::marker { color: var(--accent-2); font-weight: 700; }
.paper-item:hover { border-color: rgba(184,148,83,.5); box-shadow: var(--shadow-sm); }
.paper-row {
  display: flex; align-items: center; gap: .5rem;
}
.paper-versions {
  border-top: 1px dashed var(--line);
  padding: .35rem 1rem .6rem 1rem;
  margin: 0 .5rem;
}
.paper-versions-header {
  margin: 0 0 .25rem;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.paper-versions-list {
  list-style: none;
  padding: 0 0 0 .25rem;
  margin: 0;
}
.paper-versions-list li { margin: 0; padding: 0; }
.paper-versions-link {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: baseline;
  padding: .2rem .25rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--navy);
  font-size: .88rem;
}
.paper-versions-link:hover { background: rgba(184,148,83,.08); text-decoration: underline; }
.paper-versions-label { font-weight: 600; }
.paper-versions-when { color: var(--muted); font-size: .8rem; }
.paper-row-replace {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: .5rem;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.paper-row-replace:hover { color: var(--accent-2); background: rgba(184, 148, 83, .12); }
.paper-row-replace svg { width: 18px; height: 18px; }
.paper-dropzone {
  margin: .25rem 0 .75rem;
  padding: 1.25rem 1rem;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.paper-dropzone:hover,
.paper-dropzone:focus { border-color: var(--accent-2); outline: none; }
.paper-dropzone.is-drag { border-color: var(--accent-2); background: rgba(184,148,83,.08); }
.paper-dropzone.has-file { border-style: solid; border-color: var(--accent-2); background: #fff; }
.paper-dropzone-text { margin: 0 0 .5rem; color: var(--muted); }
.paper-dropzone-sub { display: inline-block; margin: .25rem 0; color: var(--muted); }
.paper-dropzone-file { margin: .75rem 0 0; font-weight: 600; color: var(--navy); }
.paper-replace-confirm {
  margin: .5rem 0;
  padding: .75rem 1rem;
  background: #fff7ed;
  border-left: 3px solid var(--accent-2);
  border-radius: 4px;
}
.paper-replace-confirm p { margin: 0 0 .25rem; }
.paper-replace-confirm p:last-child { margin-bottom: 0; }
.paper-row-link {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .5rem 1rem;
  align-items: baseline;
  padding: .75rem 1rem;
  color: inherit;
  text-decoration: none;
}
.paper-row-link:hover { color: var(--navy); }
.paper-row-nr {
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-2); font-weight: 700;
  white-space: nowrap;
}
.paper-row-title { font-weight: 600; color: var(--navy); }
.paper-row-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.paper-row-del {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: .5rem;
  margin-right: .5rem;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.paper-row-del:hover { color: #9a2222; background: #fbeaea; }
.paper-row-del svg { width: 18px; height: 18px; }
.paper-row-edit {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: .5rem;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.paper-row-edit:hover { color: var(--accent-2); background: rgba(184, 148, 83, .12); }
.paper-row-edit svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .paper-row-link {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
  .paper-row-meta { white-space: normal; }
}
.tagung-dialog input[type="file"] {
  padding: .4rem;
  background: #f4f6fb;
  cursor: pointer;
}

/* ---------- Intern: Statistik ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
}
.stat-card-label {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.stat-card-value {
  margin: .4rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--navy);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem 1.5rem;
  margin: 1rem 0;
}
.stat-block h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 600;
  margin: 0 0 1rem;
}
.stat-block-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: .75rem;
}
.stat-block-head h3 { margin: 0; }
.stat-toggle {
  display: inline-flex;
  background: #f4f6fb;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.stat-toggle button {
  background: transparent;
  border: none;
  padding: .35rem .8rem;
  border-radius: 6px;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.stat-toggle button.is-active {
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.stat-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
@media (max-width: 780px) {
  .stat-grid-2 { grid-template-columns: 1fr; }
}
.chart-empty {
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
  padding: 1rem;
  margin: 0;
}

/* Horizontal bar charts (Country, Device, OS, Browser) */
.chart-bars {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.chart-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: .5rem;
  align-items: center;
  font-size: .88rem;
}
.chart-row-label {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-row-bar-wrap {
  background: #f0ecdf;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.chart-row-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 5px;
  transition: width .4s ease;
}
.chart-row-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: right;
}

/* Time bar chart (columns) */
.chart-bars-time {
  min-height: 160px;
}
.chart-time-inner {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  padding-bottom: 1.5rem;
  position: relative;
  overflow-x: auto;
}
.chart-time-col {
  flex: 1 0 auto;
  min-width: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}
.chart-time-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height .3s ease;
}
.chart-time-col:hover .chart-time-bar { filter: brightness(1.1); }
.chart-time-label {
  position: absolute;
  bottom: -1.3rem;
  font-size: .65rem;
  color: var(--muted);
  white-space: nowrap;
}
.chart-time-col:nth-child(3n+1) .chart-time-label,
.chart-time-col:first-child .chart-time-label,
.chart-time-col:last-child .chart-time-label {
  display: block;
}
.chart-time-label { display: none; }
.chart-time-col:nth-child(5n) .chart-time-label,
.chart-time-col:first-child .chart-time-label,
.chart-time-col:last-child .chart-time-label {
  display: block;
}

/* Tables (Top IPs, Recent) */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  background: #fff;
}
.stat-table th {
  text-align: left;
  background: #f7f4eb;
  color: var(--navy);
  font-weight: 600;
  padding: .6rem .85rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.stat-table th.num, .stat-table td.num { text-align: right; }
.stat-table td {
  padding: .55rem .85rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
}
.stat-table tr:last-child td { border-bottom: none; }
.stat-table tr:hover td { background: #fafaf6; }
.stat-table td.empty {
  color: var(--muted);
  text-align: center;
  padding: 1.25rem;
}
.stat-table code {
  font-size: .85em;
  background: #f4f6fb;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--navy);
}

/* ---------- Papers upload dialog (extended) ---------- */
.paper-dialog form { max-width: 640px; }
.paper-dialog input:disabled,
.paper-dialog select:disabled {
  background: #f4f6fb; color: var(--muted); cursor: not-allowed;
}
.paper-dialog select {
  font: inherit; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink);
}
.paper-dialog select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.analyze-status {
  margin: 0; padding: .5rem .7rem; border-radius: 8px;
  background: #f0f3f8; color: var(--muted); font-size: .88rem;
  border: 1px solid #e2e6ee;
}
.analyze-status.busy { background: #fff8e6; border-color: #f1d99a; color: #6b4a00; }
.analyze-status.ok   { background: #ecf6ee; border-color: #b8dec1; color: #1f5b32; }
.analyze-status.err  { background: #fdecec; border-color: #f5c2c2; color: #8a1f1f; }
.cover-warn {
  margin: 0; padding: .55rem .7rem; border-radius: 8px;
  background: #fdf3e0; border: 1px solid #e9c98a; color: #6e4a00;
  font-size: .88rem;
}
.paper-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .75rem;
  align-items: end;
}
.paper-meta-row > label { margin: 0; }
.nr-display {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 0 .25rem;
}
.nr-display-label { font-size: .85rem; color: var(--muted); letter-spacing: .01em; }
.nr-display-value {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.4rem; font-weight: 600; color: var(--navy);
  min-width: 3ch; text-align: center;
}
.preview-row { display: flex; justify-content: flex-end; }
.preview-btn { color: var(--accent-2); font-weight: 500; }
.preview-btn[disabled] { color: var(--muted); cursor: not-allowed; }
.preview-box { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f6f7fa; }
.preview-box iframe { display: block; width: 100%; height: 520px; border: 0; background: #fff; }
@media (max-width: 640px) {
  .paper-meta-row { grid-template-columns: 1fr; }
  .preview-box iframe { height: 380px; }
}
.tagung-dialog .dialog-actions button[disabled] {
  opacity: .45; cursor: not-allowed;
}
.tagung-dialog .dialog-actions button[disabled]:hover {
  background: var(--navy);
}
