/* All templates page */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 20px 40px;
  background: linear-gradient(180deg, #09090b 0, #09090b 360px, #f7f7f8 360px, #fff 100%) !important;
  color: #18181b;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

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

img {
  max-width: 100%;
  vertical-align: middle;
  border: 0;
}

.container-narrow {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
}

.masthead h4 {
  margin: 0;
}

.masthead .site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.masthead img {
  width: 220px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.masthead .site-nav > li {
  float: none;
}

.masthead .site-nav > li > a {
  display: block;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  color: #e4e4e7;
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
}

.masthead .site-nav > li > a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.masthead .site-nav > .active > a,
.masthead .site-nav > .active > a:hover {
  border-color: #fff;
  background: #fff;
  color: #09090b;
}

.container-narrow > hr {
  margin: 22px 0 0;
  border-top-color: rgba(255, 255, 255, 0.16);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

.all-page {
  padding-bottom: 44px;
}

.all-hero {
  padding: 54px 0 46px;
}

.all-hero .all-eyebrow {
  margin: 0 0 12px;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 800;
  line-height: 16px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.all-hero h1 {
  max-width: 760px;
  margin: 0;
  margin-bottom: 10px;
  color: #fff;
  font-size: 46px;
  line-height: 1.06;
}

.all-hero p {
  max-width: 620px;
  margin: 0;
  color: #d4d4d8;
  font-size: 16px;
  line-height: 24px;
}

.all-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 680px;
  margin-top: 24px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.all-search input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #18181b;
  font-size: 16px;
  line-height: 46px;
}

.all-search input:focus {
  outline: none;
}

.all-search button {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 16px;
  border: 1px solid #09090b;
  border-radius: 6px;
  background: #09090b;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 46px;
  cursor: pointer;
}

.all-search button:hover {
  border-color: #27272a;
  background: #27272a;
}

.all-panel {
  padding: 26px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(9, 9, 11, 0.08);
}

.all-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ededf0;
}

.all-panel-header h2 {
  margin: 0;
  color: #18181b;
  font-size: 18px;
  line-height: 24px;
}

.all-panel-header span {
  flex: 0 0 auto;
  color: #71717a;
  font-size: 13px;
  font-weight: 700;
}

.all-template-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 18px 0 20px 0;
  list-style: none;
}

.all-template-list li {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #f1f1f3;
  color: #52525b;
  line-height: 21px;
}

.all-template-list li::before {
  content: counter(template-counter) ".";
  counter-increment: template-counter;
  flex: 0 0 auto;
  min-width: 24px;
  margin-right: 12px;
  color: #71717a;
  font-weight: 700;
  text-align: right;
}

.all-template-list a {
  flex: 1;
  min-width: 0;
  color: #18181b;
  font-weight: 700;
}

.all-template-list a:hover {
  color: #09090b;
  text-decoration: underline;
}

.all-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 0;
  padding-top: 18px;
  border-top: 1px solid #ededf0;
}

.all-pagination a,
.all-pagination .active-page {
  display: inline-block;
  min-width: 18px;
  padding: 8px 11px;
  border: 1px solid #d4d4d8;
  border-radius: 7px;
  background: #fff;
  color: #27272a;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.all-pagination a:hover {
  border-color: #18181b;
  background: #f4f4f5;
  color: #09090b;
  text-decoration: none;
}

.all-pagination .active-page {
  border-color: #09090b;
  background: #09090b;
  color: #fff;
}

.footer {
  padding: 18px 0 32px;
  margin-top: 18px;
  color: #71717a;
  font-size: 13px;
  text-align: center;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  display: inline-block;
  margin: 0 8px 8px;
  color: #3f3f46;
  font-weight: 600;
}

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

.board-preview-popup {
  position: absolute;
  z-index: 9999;
  width: 560px;
  background: rgba(9, 9, 11, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  color: #fff;
  padding: 12px;
  font-family: inherit;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  backdrop-filter: blur(8px);
}

.preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  gap: 12px;
  color: #a1a1aa;
  font-size: 14px;
}

.preview-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: preview-spin 0.8s linear infinite;
}

@keyframes preview-spin {
  to { transform: rotate(360deg); }
}

.preview-error {
  text-align: center;
  padding: 16px;
  color: #ef4444;
  font-size: 14px;
}

.preview-board-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-board-title {
  font-size: 15px;
  font-weight: 700;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-board-grid {
  display: grid;
  gap: 4px;
  background: #fff;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-grid-header {
  background: #2a3698;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  padding: 6px 2px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.preview-grid-cell {
  background: #2a3698;
  color: #f9fafb;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  padding: 0;
  border-radius: 3px;
  min-height: 72px;
  position: relative;
  overflow: hidden;
  perspective: 500px;
  cursor: zoom-in;
}

.preview-cell-face {
  position: absolute;
  inset: 0;
  padding: 7px;
  border-radius: 3px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.preview-question {
  display: -webkit-box;
  background: #2a3698;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-height: 14px;
}

.preview-answer {
  display: -webkit-box;
  overflow: hidden;
  background: #2a3698;
  color: #facc15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-height: 14px;
  opacity: 0;
  transform: rotateY(-90deg);
}

.preview-grid-cell.active:hover {
  background: #2a3698;
}

.preview-grid-cell.active:hover .preview-question {
  opacity: 0;
  transform: rotateY(90deg);
}

.preview-grid-cell.active:hover .preview-answer {
  opacity: 1;
  transform: rotateY(0deg);
}

.preview-grid-cell.empty {
  background: rgba(255, 255, 255, 0.02);
  color: transparent;
  cursor: default;
}

.preview-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 9, 11, 0.72);
}

.preview-zoom-overlay.is-open {
  display: flex;
}

.preview-zoom-card {
  position: relative;
  width: min(720px, 100%);
  padding: 26px;
  border: 1px solid #27272a;
  border-radius: 8px;
  background: #fff;
  color: #18181b;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.preview-zoom-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  background: #fff;
  color: #18181b;
  font-size: 18px;
  font-weight: 800;
  line-height: 28px;
  cursor: pointer;
}

.preview-zoom-card h3 {
  margin: 0 42px 18px 0;
  color: #71717a;
  font-size: 13px;
  line-height: 18px;
  text-transform: uppercase;
}

.preview-zoom-question {
  margin-bottom: 18px;
  color: #18181b;
  font-size: 24px;
  font-weight: 800;
  line-height: 32px;
}

.preview-zoom-answer {
  padding-top: 18px;
  border-top: 1px solid #e4e4e7;
  color: #52525b;
  font-size: 18px;
  line-height: 28px;
}

@media (max-width: 767px) {
  body {
    background: linear-gradient(180deg, #09090b 0, #09090b 430px, #f7f7f8 430px, #fff 100%) !important;
    padding-right: 16px;
    padding-left: 16px;
  }

  .masthead {
    display: block;
  }

  .masthead .site-nav {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .all-hero {
    padding: 38px 0 34px;
  }

  .all-hero h1 {
    font-size: 34px;
  }

  .all-search {
    display: grid;
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .all-panel {
    padding: 20px;
  }

  .all-panel-header {
    display: block;
  }

  .all-panel-header span {
    display: block;
    margin-top: 4px;
  }

  .all-template-list {
    grid-template-columns: 1fr;
    padding: 14px 0 18px 0;
  }

  .board-preview-popup {
    display: none !important;
  }
}
