:root {
  --ink: #f4efe6;
  --muted: #b7ae9f;
  --accent: #c9a227;
  --line: rgba(244, 239, 230, 0.16);
  --sidebar: 22rem;
  --paper: #07111f;
  --card: #0c1a2e;
  --bg: linear-gradient(
    90deg,
    #000 0%,
    #060a1c 14%,
    #1a3288 34%,
    #2d4ec4 50%,
    #1a3288 66%,
    #060a1c 86%,
    #000 100%
  );
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

body.is-cover {
  overflow: hidden;
}

a {
  color: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  padding: 1.6rem 1.15rem 2rem;
  background: linear-gradient(90deg, rgba(2, 8, 20, 0.9) 68%, rgba(2, 8, 20, 0.04));
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cover-link {
  display: inline-block;
  width: fit-content;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85rem 0.75rem;
  border-radius: 0.35rem;
}

.sidebar-kicker {
  margin: 1.4rem 0.75rem 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-evenly;
  gap: 0.55rem;
  padding-bottom: 1.5rem;
}

.sidebar nav a,
.cover-link {
  text-decoration: none;
}

.sidebar nav a {
  padding: 0.9rem 0.75rem;
  border-radius: 0.35rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.sidebar a:hover,
.sidebar a.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.defendants-toggle,
.nav-backdrop {
  display: none;
}

.cover-stage {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  background: var(--bg);
}

.cover-stage img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: fill;
}

.panel {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 3rem calc(var(--sidebar) + 1.5rem);
  background: var(--bg);
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.panel h1 {
  margin: 0 0 1.4rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
}

.panel h2 {
  margin: 2rem 0 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.party-list,
.download-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

.party-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.party-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.9rem;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 7.5rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--card);
  text-decoration: none;
}

.download-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.download-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-110%);
    width: min(20rem, 86vw);
    background: #11100e;
    transition: transform 0.2s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .defendants-toggle {
    display: inline-flex;
    position: fixed;
    z-index: 30;
    top: 0.85rem;
    left: 0.85rem;
    border: 1px solid var(--line);
    background: rgba(13, 12, 11, 0.88);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 15;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
  }

  .nav-backdrop.is-open {
    display: block;
  }

  .panel {
    padding: 5rem 1.1rem 2.5rem;
  }
}
