:root {
  --sans-serif:
    Inter, Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial,
    sans-serif;
  --monospace:
    ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas,
    "DejaVu Sans Mono", monospace;
}

body {
  --content-max-width: 56rem;
  --jp-content-font-family: var(--sans-serif);
  --jp-code-font-family-default: var(--monospace);
  --jp-content-font-size1: 1rem;
  --jp-code-font-size: 0.875rem;
  --jp-ui-font-size1: 0.875rem;
  --jp-notebook-padding: 0;

  margin: 0;
  font-family: var(--jp-content-font-family);
}

main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem;
}

body.jp-Notebook main {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 1rem;
}

.cm-editor.cm-s-jupyter .highlight pre {
  padding: 0.75rem !important;
  font-family: var(--monospace) !important;
}

div.jp-InputArea-editor {
  border-radius: 0.375rem;
}

.jp-OutputArea {
  border: var(--jp-border-width) solid var(--jp-cell-editor-border-color);
  border-radius: 0.375rem;
}


.jp-RenderedText.jp-OutputArea-output {
  padding: 0.75rem !important;
}

@media only screen and (max-width: 760px) {
  .jp-OutputArea {
    border-radius: 0;
  }

  .jp-RenderedText.jp-OutputArea-output pre {
    padding: 0.75rem;
  }

}

div.jp-RenderedText pre {
  font-family: var(--monospace);
  font-optical-sizing: auto;
  font-style: normal;
}

#navbar {
  font-family: var(--sans-serif);
  font-size: 1rem;
  background-color: #434343;
  padding: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#navbar a {
  color: white;
  text-decoration: none;
}

#navbar .navbar-github svg {
  width: 24px;
  height: 24px;
}

#navbar .navbar-logo {
  display: flex;
  align-items: center;
}

#navbar .navbar-logo svg {
  height: 30px;
  width: auto;
}

#navbar .navbar-github {
  display: flex;
  align-items: center;
  fill: #fff;
  margin-right: 5px;
}

#navbar .navbar-github:hover {
  opacity: 0.8;
}

.table-wrapper {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  padding: 0.75rem;
}

table.cookbooks {
  width: 100%;
  border-collapse: collapse;
}

table.cookbooks th {
  border-bottom: 1px solid #e0e0e0;
  padding: 0.25rem 0.75rem 0.75rem;
}

table.cookbooks td {
  border-bottom: 1px solid #e0e0e0;
  padding: 0.75rem;
}

table.cookbooks tbody tr:last-child td {
  border-bottom: none;
}

table.cookbooks th {
  font-size: 0.875rem;
  font-weight: normal;
  line-height: 1.25rem;
}

table.cookbooks th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

table.cookbooks th.sortable::after {
  content: ' ↕';
  color: #999;
}

table.cookbooks th.sortable.asc::after {
  content: ' ↑';
  color: #434343;
}

table.cookbooks th.sortable.desc::after {
  content: ' ↓';
  color: #434343;
}

table.cookbooks td:nth-child(2) .category {
  margin-left: 0.25rem;
}

table.cookbooks td:nth-child(n+2) {
  font-size: 0.875rem;
}

table.cookbooks th:nth-child(n+2),
table.cookbooks td:nth-child(n+2) {
  text-align: right;
}

table.cookbooks thead {
  text-align: left;
  color: #434343;
}

table.cookbooks tbody tr:hover {
  background-color: #f2f2f2;
}

.header {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 500;
}

.header p {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.6rem;
  color: #666;
}

.contribution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
}

.contribution p {
  margin: 0;
  font-size: 1rem;
}

.contribution a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  color: #000;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  text-decoration: none;
  white-space: nowrap;
}

.contribution a:hover {
  border-color: #666;
}

.contribution svg {
  display: block;
  flex-shrink: 0;
  stroke: #666;
}

.notebook-header {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}

.notebook-header h1 {
  margin: 0 0 2rem 0;
  font-family: var(--sans-serif);
  font-size: 2rem;
  font-weight: 500;
}

.notebook-header .authors {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.notebook-header .author-avatars {
  display: flex;
}

.notebook-header .author-avatars .author-avatar {
  margin-left: -0.5rem;
  border: 0.125rem solid #fff;
  box-sizing: content-box;
}

.notebook-header .author-avatars .author-avatar:first-child {
  margin-left: 0;
}

.notebook-header .author-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.notebook-header .author-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.notebook-header .meta {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
}

.notebook-header .meta .authors {
  grid-column: 1;
}

.notebook-header .meta .button {
  grid-column: -2;
  grid-row: 1;
}

.notebook-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  grid-column: 2 / -2;
  grid-row: 1;
}

@media (max-width: 600px) {
  .notebook-header .meta {
    grid-template-columns: 1fr auto;
  }

  .notebook-categories {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.notebook-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  border-color: #666;
}

.button svg {
  display: block;
  flex-shrink: 0;
  stroke: #666;
}

.section {
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 1.5rem 0;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--sans-serif);
  font-size: 0.875rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  box-sizing: border-box;
}

.search-input-wrapper .search-icon {
  display: none;
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.search-container.show-icon .search-icon {
  display: block;
}

.search-container.show-icon input {
  padding-left: 2.25rem;
}

.search-clear {
  display: none;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 0;
}

.search-clear svg {
  width: 0.875rem;
  height: 0.875rem;
}

.search-clear:hover svg {
  stroke: #434343;
}

.search-container.has-value .search-clear {
  display: block;
}

.search-container.has-value input {
  padding-right: 2rem;
}

.search-container.show-icon .search-clear {
  display: none;
}

.search-focused .category-dropdown {
  display: none;
}

.category-dropdown {
  position: relative;
  flex-shrink: 0;
}

.category-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  font-family: var(--sans-serif);
  font-size: 0.875rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  cursor: pointer;
  white-space: nowrap;
  color: #434343;
}

.category-clear {
  display: none;
  line-height: 0;
  color: #999;
}

.category-clear svg {
  width: 0.75rem;
  height: 0.75rem;
}

.category-clear:hover {
  color: #434343;
}

.category-dropdown.has-selection .category-clear {
  display: inline-flex;
}

.category-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  padding: 0.5rem 0;
  z-index: 10;
  min-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-dropdown.open .category-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.category-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  color: #434343;
}

.category-dropdown-item:hover {
  background: #f5f5f5;
}

.category-dropdown-item input {
  margin: 0;
  accent-color: #434343;
}

.search-container input:focus {
  outline: none;
  border-color: #666;
}

.search-container input::placeholder {
  color: #999;
}

.no-results {
  text-align: center;
  color: #666;
  padding: 2rem 0.75rem !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.category {
  white-space: nowrap;
  background: #f0f0f0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #666;
}

.category-sep {
  display: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  font-family: var(--sans-serif);
  font-size: 0.75rem;
  border-top: 1px solid #e0e0e0;
  color: #666;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  color: #666;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.featured-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  overflow: hidden;
}

.featured-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 1;
  overflow: hidden;
}

.featured-card:nth-child(1) .featured-card-icon {
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
}

.featured-card:nth-child(2) .featured-card-icon {
  background: linear-gradient(90deg, #34d399, #22d3d5);
}

.featured-card:nth-child(3) .featured-card-icon {
  background: linear-gradient(90deg, #f472b6, #fbbf24);
}

.featured-card-icon svg {
  width: clamp(1.5rem, 5vw, 3rem);
  height: clamp(1.5rem, 5vw, 3rem);
  fill: #fff;
}

.featured-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background-color: #fff;
  padding: 1rem 1rem 0.75rem;
  gap: 0.75rem;
  align-items: flex-end;
}

.featured-card-title {
  font-size: 1rem;
  font-weight: 400;
  text-align: left;
  align-self: flex-start;
}

.featured-card-category {
  margin-top: auto;
  font-size: 0.75rem;
  color: #666;
  background: #f0f0f0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}


@media (max-width: 600px) {
  .featured {
    grid-template-columns: 1fr;
  }

  .featured-card {
    flex-direction: row;
  }

  .featured-card-icon {
    flex-shrink: 0;
    width: 5rem;
    aspect-ratio: 1;
  }

  .featured-card-icon svg {
    width: 2rem;
    height: 2rem;
  }

  table.cookbooks th:nth-child(2),
  table.cookbooks td:nth-child(2) {
    display: none;
  }

  .contribution {
    flex-direction: column;
    text-align: center;
  }
}

.github-label-short,
.back-label-short,
.footer-label-short {
  display: none;
}

@media (max-width: 480px) {
  .footer-label-full {
    display: none;
  }

  .footer-label-short {
    display: inline;
  }
}

@media (max-width: 380px) {
  table.cookbooks th:nth-child(3),
  table.cookbooks td:nth-child(3) {
    display: none;
  }
}

@media (max-width: 375px) {
  .github-label-full,
  .back-label-full {
    display: none;
  }

  .github-label-short,
  .back-label-short {
    display: inline;
  }
}
