:root {
  --bg: #07080b;
  --surface: rgba(11, 13, 18, .88);
  --surface-deep: rgba(4, 5, 8, .95);
  --line: rgba(177, 18, 38, .34);
  --line-soft: rgba(232, 230, 223, .12);
  --ether: #b11226;
  --ether-hot: #dc1f3b;
  --gold: #b88a3b;
  --teal: #2fc8c2;
  --teal-soft: rgba(47, 200, 194, .18);
  --text: #e8e6df;
  --muted: rgba(232, 230, 223, .68);
  --dim: rgba(232, 230, 223, .42);
  --home-hero-desktop: url("/assets/hero-home.webp");
  --home-hero-mobile: url("/assets/hero-home-mobile.webp");
  --motion-x: 0px;
  --motion-y: 0px;
  --motion-x-reverse: 0px;
  --motion-y-reverse: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 72% 0%, rgba(177, 18, 38, .20), transparent 34rem),
    linear-gradient(180deg, #07080b, #0b0d10 44%, #050609);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(177, 18, 38, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 230, 223, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 76%);
  opacity: .52;
  z-index: -1;
  animation: gridDrift 18s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(47, 200, 194, .10), transparent),
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(47, 200, 194, .035) 6px, transparent 7px);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateY(-20%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  padding: 28px 22px;
  border-right: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(4, 5, 8, .97), rgba(10, 12, 17, .86));
  display: flex;
  flex-direction: column;
  gap: 28px;
  isolation: isolate;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(47, 200, 194, .55), transparent);
  box-shadow: 0 0 14px rgba(47, 200, 194, .28);
  animation: sidebarSignal 6s ease-in-out infinite;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.brand img {
  width: 42px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(177, 18, 38, .55));
  transition: filter .35s ease, transform .35s ease;
}

.brand:hover img {
  transform: rotate(7deg) scale(1.06);
  filter: drop-shadow(0 0 18px rgba(220, 31, 59, .75));
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  border: 1px solid transparent;
  color: var(--muted);
  padding: 11px 12px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease, transform .25s ease;
}

.nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(47, 200, 194, .13), transparent);
  transform: translateX(-110%);
  transition: transform .55s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(177, 18, 38, .10);
  transform: translateX(4px);
}

.nav a:hover::before,
.nav a.active::before {
  transform: translateX(110%);
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, .28);
  display: grid;
  gap: 8px;
}

.sidebar-note span,
.eyebrow,
.summary-card span {
  color: var(--ether-hot);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sidebar-note a,
.inline-link {
  color: var(--gold);
  font-weight: 800;
}

main {
  min-width: 0;
}

.home-page,
.publication-page {
  display: none;
}

.home-page.active,
.publication-page.active {
  display: block;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  padding: 7vw min(7vw, 96px);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 6, 9, .94), rgba(5, 6, 9, .48) 48%, rgba(5, 6, 9, .88)),
    linear-gradient(180deg, rgba(5, 6, 9, .12), rgba(5, 6, 9, .92)),
    var(--home-hero-desktop) center right / cover no-repeat;
  transform: translate3d(var(--motion-x-reverse), var(--motion-y-reverse), 0) scale(1.065);
  transition: transform .18s ease-out;
  animation: heroBreathe 16s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  max-width: 820px;
  text-align: center;
  display: grid;
  justify-items: center;
  transform: translate3d(var(--motion-x), var(--motion-y), 0);
  transition: transform .18s ease-out;
}

.hero-content::before,
.hero-content::after,
.home-catalog::before,
.publication-intro::before,
.category-dropdown::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-content::before {
  width: min(720px, 84vw);
  height: min(720px, 84vw);
  border: 1px solid rgba(47, 200, 194, .14);
  box-shadow:
    inset 0 0 46px rgba(47, 200, 194, .05),
    0 0 44px rgba(177, 18, 38, .12);
  transform: rotate(45deg);
  z-index: -1;
}

.hero-content::after {
  inset: -20px -40px;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(47, 200, 194, .11) 13%, transparent 14% 100%),
    repeating-linear-gradient(180deg, rgba(47, 200, 194, .055) 0 1px, transparent 1px 9px);
  opacity: .30;
  mask-image: radial-gradient(circle, black, transparent 72%);
  z-index: -1;
  animation: hologramScan 7s linear infinite;
}

.hero-logo {
  width: clamp(150px, 22vw, 270px);
  height: auto;
  object-fit: contain;
  margin-bottom: 18px;
  filter:
    drop-shadow(0 0 16px rgba(177, 18, 38, .88))
    drop-shadow(0 0 30px rgba(47, 200, 194, .18));
  animation: sealPulse 4.8s ease-in-out infinite;
}

@keyframes sealPulse {
  0%, 100% {
    opacity: .88;
    transform: translate3d(var(--motion-x-reverse), var(--motion-y-reverse), 0) scale(.985);
  }

  48% {
    opacity: 1;
    transform: translate3d(var(--motion-x-reverse), var(--motion-y-reverse), 0) scale(1.025);
  }
}

h1,
h2,
h3,
legend {
  font-family: Cinzel, serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 16px;
  font-size: clamp(3.3rem, 9vw, 7rem);
  line-height: .92;
  text-shadow: 0 0 30px rgba(177, 18, 38, .50);
}

h2 {
  margin: 6px 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.8rem);
}

h3 {
  margin: 9px 0 10px;
  font-size: 1.02rem;
}

p {
  color: var(--muted);
  line-height: 1.72;
}

.lead {
  max-width: 880px;
  margin-top: 0;
  font-size: 1rem;
}

.hero-content p:not(.eyebrow) {
  max-width: 720px;
  font-size: 1.06rem;
}

.hero-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  min-height: 42px;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, .34);
  color: var(--text);
  padding: 11px 18px;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, filter .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.btn::after,
.back-link::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .20) 50%, transparent 65%);
  transform: translateX(-140%);
  transition: transform .65s ease;
}

.btn.primary {
  border-color: rgba(220, 31, 59, .70);
  background: linear-gradient(180deg, rgba(177, 18, 38, .96), rgba(80, 6, 18, .96));
  box-shadow: 0 0 22px rgba(177, 18, 38, .24);
}

.btn:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.btn:hover::after,
.back-link:hover::after {
  transform: translateX(140%);
}

.home-catalog {
  position: relative;
  padding: 96px min(7vw, 96px);
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(7, 8, 11, .72), rgba(7, 8, 11, .96)),
    radial-gradient(circle at 14% 20%, rgba(47, 200, 194, .08), transparent 30rem);
}

.home-catalog::before {
  top: 0;
  right: min(7vw, 96px);
  width: min(420px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 200, 194, .75), transparent);
  box-shadow: 0 0 18px rgba(47, 200, 194, .35);
}

.section-head {
  max-width: 860px;
  margin-bottom: 34px;
}

.category-dropdown {
  position: relative;
  margin-bottom: 40px;
  border: 1px solid rgba(47, 200, 194, .28);
  background:
    linear-gradient(180deg, rgba(4, 15, 18, .80), rgba(5, 6, 9, .90)),
    repeating-linear-gradient(180deg, rgba(47, 200, 194, .055) 0 1px, transparent 1px 10px);
  box-shadow:
    inset 0 0 28px rgba(47, 200, 194, .05),
    0 0 34px rgba(47, 200, 194, .06);
}

.category-dropdown::before {
  inset: 0;
  border-top: 1px solid rgba(47, 200, 194, .48);
  opacity: .75;
  animation: borderSignal 5.5s ease-in-out infinite;
}

.category-dropdown summary {
  min-height: 58px;
  padding: 18px 22px;
  color: var(--teal);
  cursor: pointer;
  font-family: Cinzel, serif;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 0 18px 18px;
}

.category-card {
  min-height: 188px;
  border: 1px solid rgba(47, 200, 194, .18);
  background:
    linear-gradient(180deg, rgba(6, 18, 20, .70), rgba(4, 5, 8, .92)),
    radial-gradient(circle at 50% 0%, rgba(47, 200, 194, .15), transparent 70%);
  color: var(--text);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  box-shadow: inset 0 0 18px rgba(47, 200, 194, .04);
  position: relative;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform .22s ease-out, border-color .25s ease, box-shadow .25s ease;
}

.category-card::before,
.summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 0%), rgba(47, 200, 194, .19), transparent 42%);
  opacity: .38;
  transition: opacity .25s ease;
}

.category-card > *,
.summary-card > * {
  position: relative;
  z-index: 1;
}

.category-card span {
  color: var(--teal);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.category-card strong {
  font-family: Cinzel, serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.category-card em {
  color: var(--muted);
  font-style: normal;
  font-size: .84rem;
  line-height: 1.55;
}

.category-card::after {
  content: "Abrir publicacion";
  align-self: end;
  margin-top: 12px;
  color: var(--gold);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.category-card:hover,
.category-card:focus-visible {
  border-color: rgba(47, 200, 194, .58);
  box-shadow:
    inset 0 0 24px rgba(47, 200, 194, .09),
    0 0 28px rgba(47, 200, 194, .10);
  outline: none;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-5px);
}

.category-card:hover::before,
.summary-card:hover::before {
  opacity: .9;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(13, 16, 22, .88), rgba(5, 6, 10, .82)),
    radial-gradient(circle at 50% 0%, rgba(177, 18, 38, .10), transparent 62%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .28);
  position: relative;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .22s ease-out, border-color .25s ease, box-shadow .25s ease;
}

.summary-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
  border-color: rgba(177, 18, 38, .42);
  box-shadow: inset 0 0 22px rgba(177, 18, 38, .08), 0 16px 34px rgba(0, 0, 0, .26);
}

.publication-hero {
  position: relative;
  min-height: 48vh;
  display: grid;
  align-content: end;
  padding: 86px min(7vw, 96px) 54px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(90deg, rgba(4, 5, 8, .95), rgba(4, 5, 8, .62) 48%, rgba(4, 5, 8, .92)),
    linear-gradient(180deg, rgba(4, 5, 8, .14), rgba(4, 5, 8, .95)),
    var(--publication-image-desktop) calc(100% + var(--motion-x-reverse)) calc(50% + var(--motion-y-reverse)) / cover no-repeat;
  transition: background-position .18s ease-out;
}

.publication-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(47, 200, 194, .04) 0 1px, transparent 1px 10px),
    linear-gradient(90deg, rgba(177, 18, 38, .10), transparent 30%, rgba(47, 200, 194, .08));
  background-size: auto, 200% 100%;
  animation: publicationSignal 8s linear infinite;
}

.publication-hero > * {
  position: relative;
  z-index: 1;
  max-width: 920px;
}

.publication-hero h1 {
  margin-top: 10px;
}

.publication-hero p:not(.eyebrow) {
  max-width: 640px;
  font-size: 1.05rem;
}

.back-link {
  width: fit-content;
  margin-bottom: 18px;
  border: 1px solid rgba(47, 200, 194, .28);
  background: rgba(0, 0, 0, .28);
  color: var(--teal);
  padding: 9px 12px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}

.back-link:hover {
  color: var(--text);
  border-color: rgba(47, 200, 194, .58);
  transform: translateX(-3px);
}

.publication-shell {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 34px;
  padding: 54px min(7vw, 96px) 100px;
  align-items: start;
}

.publication-toc {
  position: sticky;
  top: 30px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(47, 200, 194, .22);
  background:
    linear-gradient(180deg, rgba(4, 17, 20, .80), rgba(5, 6, 9, .92)),
    repeating-linear-gradient(180deg, rgba(47, 200, 194, .035) 0 1px, transparent 1px 10px);
  padding: 18px;
  box-shadow: 0 0 28px rgba(47, 200, 194, .06);
  scrollbar-color: rgba(47, 200, 194, .55) rgba(0, 0, 0, .20);
  scrollbar-width: thin;
}

.publication-toc strong {
  margin-bottom: 8px;
  color: var(--teal);
  font-family: Cinzel, serif;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.publication-toc button {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease, transform .25s ease;
}

.publication-toc button:hover,
.publication-toc button:focus-visible,
.publication-toc button.active {
  border-color: rgba(47, 200, 194, .28);
  color: var(--text);
  outline: none;
  background: rgba(47, 200, 194, .08);
  transform: translateX(4px);
}

.publication-toc button.active {
  border-left-color: var(--teal);
  box-shadow: inset 10px 0 18px rgba(47, 200, 194, .055);
}

.publication-content {
  display: grid;
  gap: 28px;
  max-width: 1040px;
}

.publication-page.publication-paused .publication-shell {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
  min-height: 42vh;
}

.publication-paused .publication-toc {
  display: none;
}

.whitelist-pause {
  min-height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  box-shadow:
    inset 0 0 42px rgba(47, 200, 194, .07),
    0 0 34px rgba(47, 200, 194, .08);
}

.whitelist-pause::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0 45%, rgba(47, 200, 194, .13) 50%, transparent 55% 100%);
  transform: translateY(-110%);
  animation: pauseSignal 4.8s ease-in-out infinite;
}

.whitelist-pause p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  color: var(--text);
  font-family: Cinzel, serif;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.55;
  text-shadow:
    0 0 22px rgba(47, 200, 194, .25),
    0 0 32px rgba(177, 18, 38, .18);
  text-transform: uppercase;
}

.markdown-document {
  display: grid;
  gap: 28px;
}

.publication-intro,
.publication-part,
fieldset {
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(13, 16, 22, .88), rgba(5, 6, 10, .84)),
    radial-gradient(circle at 50% 0%, rgba(177, 18, 38, .10), transparent 62%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .28);
}

.publication-intro {
  position: relative;
  padding: 28px;
  border-color: rgba(47, 200, 194, .25);
  background:
    linear-gradient(180deg, rgba(4, 17, 20, .74), rgba(5, 6, 10, .88)),
    repeating-linear-gradient(180deg, rgba(47, 200, 194, .05) 0 1px, transparent 1px 12px);
}

.publication-intro::before {
  inset: 0;
  border-left: 2px solid rgba(47, 200, 194, .45);
  box-shadow: inset 18px 0 30px rgba(47, 200, 194, .05);
}

.publication-intro p {
  position: relative;
  margin: 0;
  max-width: 900px;
  font-size: 1.03rem;
}

.publication-part {
  scroll-margin-top: 28px;
  position: relative;
  padding: 34px;
  overflow: hidden;
}

.publication-part::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-left: 2px solid rgba(47, 200, 194, .22);
  background:
    linear-gradient(90deg, rgba(47, 200, 194, .055), transparent 24%),
    repeating-linear-gradient(180deg, rgba(232, 230, 223, .018) 0 1px, transparent 1px 13px);
  opacity: .72;
  background-size: 100% 100%, 100% 26px;
  animation: articleScan 12s linear infinite;
}

.route-enter {
  animation: pageEnter .56s cubic-bezier(.2, .75, .25, 1) both;
}

body.route-transition::after {
  animation: routeSweep .7s ease-out both;
}

.motion-reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  filter: blur(4px);
  transition:
    opacity .7s cubic-bezier(.2, .75, .25, 1) var(--reveal-delay, 0ms),
    transform .7s cubic-bezier(.2, .75, .25, 1) var(--reveal-delay, 0ms),
    filter .7s ease var(--reveal-delay, 0ms);
}

.motion-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

@keyframes gridDrift {
  to { background-position: 44px 44px; }
}

@keyframes sidebarSignal {
  0%, 100% { opacity: .18; transform: scaleY(.35) translateY(-75%); }
  50% { opacity: .85; transform: scaleY(.7) translateY(22%); }
}

@keyframes heroBreathe {
  from { filter: saturate(.9) brightness(.94); }
  to { filter: saturate(1.08) brightness(1.04); }
}

@keyframes hologramScan {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 0 90px; }
}

@keyframes borderSignal {
  0%, 100% { opacity: .35; }
  50% { opacity: .9; box-shadow: inset 0 1px rgba(47, 200, 194, .22); }
}

@keyframes publicationSignal {
  to { background-position: 0 80px, -200% 0; }
}

@keyframes articleScan {
  to { background-position: 0 0, 0 104px; }
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes routeSweep {
  0% { opacity: 0; transform: translateY(-20%); }
  32% { opacity: .32; }
  100% { opacity: 0; transform: translateY(20%); }
}

@keyframes pauseSignal {
  0%, 18% { opacity: 0; transform: translateY(-110%); }
  45% { opacity: .65; }
  78%, 100% { opacity: 0; transform: translateY(110%); }
}

.publication-part > * {
  position: relative;
}

.publication-part h2 {
  margin-bottom: 18px;
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
}

.publication-part p {
  max-width: 920px;
  margin: 0;
}

.publication-part p + p {
  margin-top: 14px;
}

.publication-part ul,
.publication-part ol {
  position: relative;
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

.publication-part ol {
  padding-left: 26px;
}

.publication-part li + li {
  margin-top: 8px;
}

.publication-part strong {
  color: var(--text);
}

.publication-part em {
  color: var(--gold);
}

.md-heading-block h3,
.md-heading-block h4 {
  margin: 8px 0 14px;
  font-family: Cinzel, serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.md-callout {
  position: relative;
  margin: 18px 0 0;
  border: 1px solid rgba(47, 200, 194, .28);
  background:
    linear-gradient(180deg, rgba(4, 17, 20, .78), rgba(5, 6, 10, .88)),
    repeating-linear-gradient(180deg, rgba(47, 200, 194, .045) 0 1px, transparent 1px 11px);
  color: var(--muted);
  padding: 18px;
  line-height: 1.65;
}

.md-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid rgba(232, 230, 223, .12);
}

.wiki-side-image {
  float: right;
  width: min(38%, 360px);
  margin: 0 0 22px 28px;
  border: 1px solid rgba(47, 200, 194, .28);
  background:
    linear-gradient(180deg, rgba(4, 17, 20, .78), rgba(5, 6, 10, .92)),
    repeating-linear-gradient(180deg, rgba(47, 200, 194, .035) 0 1px, transparent 1px 10px);
  padding: 10px;
  box-shadow:
    inset 0 0 20px rgba(47, 200, 194, .05),
    0 0 28px rgba(47, 200, 194, .08);
}

.wiki-side-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.wiki-side-image figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: rgba(0, 0, 0, .20);
}

th,
td {
  border-bottom: 1px solid rgba(232, 230, 223, .10);
  border-right: 1px solid rgba(232, 230, 223, .08);
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

th {
  color: var(--teal);
  background: rgba(47, 200, 194, .08);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

form.application {
  display: grid;
  gap: 22px;
}

fieldset {
  padding: 24px;
}

legend {
  color: var(--gold);
  padding: 0 8px;
  font-size: .9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--dim);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(177, 18, 38, .28);
  background: rgba(0, 0, 0, .35);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 118px;
  resize: vertical;
  text-transform: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(220, 31, 59, .72);
  box-shadow: 0 0 0 2px rgba(177, 18, 38, .16);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: rgba(220, 31, 59, .95);
  box-shadow:
    0 0 0 2px rgba(177, 18, 38, .22),
    0 0 18px rgba(220, 31, 59, .20);
}

.field-error {
  margin: 2px 0 0;
  color: #ff7b8f;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.checks {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.checks label,
.choice-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: .9rem;
  line-height: 1.5;
}

.checks input,
.choice-group input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.question-list {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.choice-group {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(232, 230, 223, .10);
  background: rgba(0, 0, 0, .18);
  padding: 16px;
}

.choice-group strong {
  color: var(--text);
  font-size: .9rem;
  line-height: 1.55;
}

form.application fieldset > label + label,
form.application fieldset > .form-grid + label,
form.application fieldset > .question-list + label {
  margin-top: 14px;
}

form.application textarea[name="p14_history"] {
  min-height: 260px;
}

form.application textarea[minlength="300"] {
  min-height: 170px;
}

#formStatus {
  min-height: 24px;
  margin: 0 auto 0 0;
}

@media (max-width: 1200px) {
  .category-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .sidebar::after {
    inset: auto 0 0;
    width: auto;
    height: 1px;
    animation: mobileSignal 6s ease-in-out infinite;
  }

  .nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .sidebar-note {
    margin-top: 0;
  }

  .hero {
    min-height: 76vh;
    padding: 96px 20px 48px;
  }

  .home-catalog,
  .publication-shell {
    padding: 58px 18px;
  }

  .publication-shell {
    grid-template-columns: 1fr;
  }

  .publication-toc {
    position: static;
  }

  .publication-hero {
    min-height: 42vh;
    padding: 76px 20px 42px;
  }
}

@media (max-width: 768px) {
  .hero-media {
    background:
      linear-gradient(90deg, rgba(5, 6, 9, .94), rgba(5, 6, 9, .48) 48%, rgba(5, 6, 9, .88)),
      linear-gradient(180deg, rgba(5, 6, 9, .12), rgba(5, 6, 9, .92)),
      var(--home-hero-mobile) center center / cover no-repeat;
    transform: scale(1.055);
    animation: mobileHeroDrift 14s ease-in-out infinite alternate;
  }

  .hero-content {
    transform: none;
  }

  .publication-hero {
    min-height: 50vh;
    padding-top: 104px;
    background:
      linear-gradient(90deg, rgba(4, 5, 8, .95), rgba(4, 5, 8, .62) 48%, rgba(4, 5, 8, .92)),
      linear-gradient(180deg, rgba(4, 5, 8, .14), rgba(4, 5, 8, .95)),
      var(--publication-image-mobile) center center / cover no-repeat;
    animation: mobilePublicationDrift 15s ease-in-out infinite alternate;
  }

  .publication-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.8rem);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .category-card,
  .category-card:hover,
  .summary-card,
  .summary-card:hover {
    transform: none;
  }
}

@media (max-width: 640px) {
  .nav,
  .category-grid,
  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: 150px;
    height: auto;
  }

  h1 {
    font-size: clamp(2.6rem, 16vw, 4.4rem);
  }

  .category-card,
  .summary-card,
  .publication-intro,
  .publication-part,
  fieldset {
    padding: 18px;
  }

  .wiki-side-image {
    float: none;
    width: 100%;
    margin: 0 0 18px;
  }
}

@keyframes mobileSignal {
  0%, 100% { opacity: .18; transform: scaleX(.25) translateX(-120%); }
  50% { opacity: .8; transform: scaleX(.65) translateX(25%); }
}

@keyframes mobileHeroDrift {
  from { background-position: center center, center center, 48% center; }
  to { background-position: center center, center center, 54% center; }
}

@keyframes mobilePublicationDrift {
  from { background-position: center center, center center, 48% center; }
  to { background-position: center center, center center, 53% center; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .hero-media,
  .hero-content,
  .category-card,
  .category-card:hover,
  .summary-card,
  .summary-card:hover {
    transform: none;
  }

  .motion-reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
