.publications-page,
.publication-detail {
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  background: #fff;
}

.publications-search {
  max-width: 30rem;
  margin: 0;
}

.publications-search label,
.publication-sidebar label {
  margin: 0;
  padding: 0;
}

.publications-search .searchInput,
.publication-sidebar .searchInput {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.publications-search .searchInput:focus,
.publication-sidebar .searchInput:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px #ccfbf1;
}

.publication-groups--index {
  margin-top: 3rem;
}

.publication-group + .publication-group {
  margin-top: 3.25rem;
}

.publication-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
}

.publication-group-heading h2,
.publication-group-heading span {
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.publication-group-heading span {
  color: #94a3b8;
}

.publication-group-items {
  display: grid;
  gap: 0.75rem;
}

.publication-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.9fr) 1.5rem;
  gap: 1.5rem;
  align-items: center;
  min-height: 7.75rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid #dbe3ec;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.publication-item:hover {
  border-color: #94a3b8;
  box-shadow: 0 5px 16px rgb(15 23 42 / 8%);
  transform: translateX(2px);
}

.publication-item:focus-visible {
  outline: 3px solid #99f6e4;
  outline-offset: 3px;
}

.publication-item h3 {
  margin: 0;
  color: inherit;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
}

.publication-item-subtitle {
  display: -webkit-box;
  margin: 0.4rem 0 0;
  overflow: hidden;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.publication-item-details {
  min-width: 0;
  padding-left: 1.5rem;
  border-left: 1px solid #e2e8f0;
}

.publication-item-authors,
.publication-item-source {
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.5;
}

.publication-item-authors {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.publication-item-source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  margin-top: 0.55rem;
  color: #0f766e;
}

.publication-item-arrow {
  color: #0f766e;
  font-size: 1.125rem;
  line-height: 1;
  transition: transform 150ms ease;
}

.publication-item:hover .publication-item-arrow {
  transform: translateX(2px);
}

.publication-layout {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 100vh;
}

.publication-sidebar {
  display: none;
  flex: 0 0 22rem;
  flex-direction: column;
  height: 100vh;
  padding: 1.25rem 1rem 2rem;
  overflow-y: auto;
  border-right: 1px solid #dbe3ec;
  background: #f8fafc;
}

.publication-sidebar-heading {
  display: block;
  margin-bottom: 1rem;
  color: #0f172a;
  text-decoration: none;
}

.publication-sidebar-heading span {
  display: block;
  color: #0f766e;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.publication-sidebar-heading strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

.publication-sidebar .publication-groups {
  margin-top: 2rem;
}

.publication-sidebar .publication-group + .publication-group {
  margin-top: 2.5rem;
}

.publication-sidebar .publication-item {
  display: block;
  min-height: 0;
  padding: 1rem;
}

.publication-sidebar .publication-item-details {
  margin-top: 0.75rem;
  padding: 0.75rem 0 0;
  border-top: 1px solid #e2e8f0;
  border-left: 0;
}

.publication-sidebar .publication-item-arrow {
  display: none;
}

.publication-sidebar .publication-item.is-current {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 5px 16px rgb(15 23 42 / 16%);
}

.publication-sidebar .publication-item.is-current .publication-item-subtitle,
.publication-sidebar .publication-item.is-current .publication-item-authors {
  color: #cbd5e1;
}

.publication-sidebar .publication-item.is-current .publication-item-details {
  border-color: #334155;
}

.publication-sidebar .publication-item.is-current .publication-item-source {
  color: #5eead4;
}

.publication-article {
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  padding: 4.5rem 3rem 6rem;
}

.publication-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 650;
  text-decoration: none;
}

.publication-back-link:hover {
  color: #0f766e;
}

.publication-header {
  padding-bottom: 2.75rem;
  border-bottom: 1px solid #cbd5e1;
}

.publication-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
}

.publication-header-meta span {
  color: #0f766e;
  text-transform: uppercase;
}

.publication-header h1 {
  max-width: 48rem;
  margin: 1.1rem 0 0;
  color: #0f172a;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.12;
}

.publication-subtitle {
  max-width: 44rem;
  margin: 0.875rem 0 0;
  color: #475569;
  font-size: 1.125rem;
  line-height: 1.55;
}

.publication-authors {
  margin: 1.75rem 0 0;
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.6;
}

.publication-source {
  margin: 0.3rem 0 0;
  color: #0f766e;
  font-size: 0.8125rem;
  font-style: italic;
  line-height: 1.5;
}

.publication-content {
  max-width: none;
  padding-top: 0.5rem;
}

.publication-content h3 {
  padding-top: 2.25rem;
  border-top: 1px solid #e2e8f0;
  color: #0f172a;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.3;
}

.publication-content h3:first-child {
  border-top: 0;
}

.publication-content p {
  color: #334155;
  font-size: 1rem;
  line-height: 1.85;
}

.publication-embed {
  margin: 2.25rem 0 3rem;
}

.publication-embed-frame {
  height: 42rem;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #f1f5f9;
}

.publication-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.publication-embed figcaption {
  margin-top: 0.6rem;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.5;
}

.publication-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.5rem;
  padding: 1.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.publication-link-copy span,
.publication-link-copy strong {
  display: block;
}

.publication-link-copy span {
  color: #0f766e;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.publication-link-copy strong {
  margin-top: 0.25rem;
  color: #0f172a;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.publication-link > a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.375rem;
  background: #0f172a;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 150ms ease, transform 150ms ease;
}

.publication-link > a:hover {
  background: #0f766e;
  transform: translateY(-1px);
}

.publication-link > a:focus-visible {
  outline: 3px solid #99f6e4;
  outline-offset: 3px;
}

.publication-link svg {
  width: 1rem;
  height: 1rem;
}

html.dark .publications-page,
html.dark .publication-detail {
  background: #0f172a;
}

html.dark .publication-header,
html.dark .publication-content h3 {
  border-color: #334155;
}

html.dark .publication-header h1,
html.dark .publication-content h3,
html.dark .publication-authors,
html.dark .publication-sidebar-heading,
html.dark .publication-link-copy strong {
  color: #f8fafc;
}

html.dark .publication-header-meta span,
html.dark .publication-source,
html.dark .publication-sidebar-heading span,
html.dark .publication-item-source,
html.dark .publication-link-copy span {
  color: #5eead4;
}

html.dark .publication-group-heading h2,
html.dark .publication-group-heading span,
html.dark .publication-header-meta,
html.dark .publication-embed figcaption {
  color: #94a3b8;
}

html.dark .publications-search .searchInput,
html.dark .publication-sidebar .searchInput,
html.dark .publication-item,
html.dark .publication-link {
  border-color: #334155;
  background: #1e293b;
  color: #f8fafc;
}

html.dark .publications-search .searchInput,
html.dark .publication-sidebar .searchInput {
  color: #f8fafc;
}

html.dark .publication-item:hover {
  border-color: #64748b;
}

html.dark .publication-item-subtitle,
html.dark .publication-content p,
html.dark .publication-subtitle {
  color: #cbd5e1;
}

html.dark .publication-item-authors,
html.dark .publication-back-link {
  color: #94a3b8;
}

html.dark .publication-item-details,
html.dark .publication-sidebar .publication-item-details {
  border-color: #334155;
}

html.dark .publication-sidebar {
  border-color: #334155;
  background: #111c2f;
}

html.dark .publication-sidebar .publication-item.is-current {
  border-color: #5eead4;
  background: #0f172a;
}

html.dark .publication-embed-frame {
  border-color: #334155;
  background: #1e293b;
}

html.dark .publication-link > a {
  background: #f8fafc;
  color: #0f172a;
}

html.dark .publication-link > a:hover {
  background: #5eead4;
}

@media (min-width: 1180px) {
  .publication-sidebar {
    display: flex;
  }

  .publication-back-link {
    display: none;
  }
}

@media (max-width: 760px) {
  .publication-article {
    padding: 4.5rem 1.5rem 4rem;
  }

  .publication-header h1 {
    font-size: 2rem;
  }

  .publication-item {
    display: block;
    min-height: 0;
    padding: 1.1rem;
  }

  .publication-item-details {
    margin-top: 0.85rem;
    padding: 0.85rem 0 0;
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }

  .publication-item-arrow {
    display: none;
  }

  .publication-header-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .publication-subtitle {
    font-size: 1rem;
  }

  .publication-embed-frame {
    height: 32rem;
  }

  .publication-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.25rem;
  }

  .publication-link > a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .publication-item,
  .publication-item-arrow,
  .publication-link > a {
    transition: none;
  }
}
