html[data-i18n-state="loading"] [data-i18n],
html[data-i18n-state="loading"] [data-i18n-attr] {
  visibility: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
}

.pillar-page-wrap {
  flex: 1;
  /* 1200px - 5rem padding => 1120px content, matching index swirl-text-block width */
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 3rem;
  width: 100%;
  color: #111827;
}

@media (max-width: 768px) {
  .pillar-page-wrap {
    padding: 1.25rem 1rem 2rem;
  }
}

.pillar-hero {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 2rem 2rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.pillar-hero h1 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.25;
  color: #45110b;
  margin: 0 0 1rem;
}

.pillar-section {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  line-height: 1.7;
  font-size: 1.02rem;
}

.pillar-section h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #45110b;
  margin: 0 0 0.85rem;
}

.pillar-section h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: #1f2740;
  margin: 1.1rem 0 0.35rem;
}

.pillar-hero p,
.pillar-section p {
  margin-bottom: 0.85rem;
}

.pillar-section ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 0.5rem;
}

.pillar-section li {
  margin-bottom: 0.5rem;
}

.pillar-hero a,
.pillar-section a {
  color: #2563eb;
  text-decoration: underline;
}

.pillar-cta-row a {
  font-weight: 600;
}

.pillar-hero .pillar-create-row {
  margin-top: 0.5rem;
}

.pillar-create-note {
  font-size: 0.98rem;
  color: #5a6278;
  margin-bottom: 1rem;
}

.pillar-create-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.pillar-create-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}

.pillar-create-witch {
  flex: 0 0 200px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.pillar-witch-img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pillar-witch-img[src*="witch-notebook"] {
  transform: scaleX(-1);
}

.pillar-examples-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pillar-example-item {
  margin: 0;
}

.pillar-example-item a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  text-decoration: none;
  color: #2563eb;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pillar-example-item a:hover {
  border-color: #2563eb;
  background: #f0f7ff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
}

.pillar-example-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f1f5f9 0%, #e8ecf0 100%);
}

div.pillar-example-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #94a3b8;
}

.pillar-example-item span {
  line-height: 1.45;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 768px) {
  .pillar-create-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pillar-create-witch {
    flex: none;
    align-self: center;
    max-width: 220px;
  }
}

.pillar-create-link {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.pillar-create-link:hover {
  border-color: #2563eb;
  background: #f0f7ff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
}

.pillar-create-link-title {
  display: block;
  font-weight: 700;
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 0.35rem;
}

.pillar-create-link-desc {
  display: block;
  font-size: 0.98rem;
  color: #374151;
  line-height: 1.55;
  text-decoration: none;
}

.pillar-diagram-placeholder {
  border: 2px dashed #c7cdda;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  background: #f8fafc;
  color: #5a6278;
  font-size: 0.98rem;
}

.pillar-diagram-placeholder p {
  margin: 0;
}

/* Language switcher (black globe) */
#pillarLangSwitcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#pillarLangSwitcher .pillar-lang-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.15);
  padding: 0.35rem;
  z-index: 9999;
  min-width: 60px;
}

#pillarLangSwitcher .pillar-lang-item {
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
}

#pillarLangSwitcher .pillar-lang-item:hover {
  background: #f1f5f9;
}

#pillarLangSwitcher .pillar-lang-item.active {
  background: #e8f0fe;
  color: #2563eb;
}

#pillarGlobeBtn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  opacity: 0.85;
  transition: opacity 0.2s;
}

#pillarGlobeBtn:hover {
  opacity: 1;
}

/* How-it-works diagram (moved to the video contests page) */
.quizly-how-it-works {
  --q-ink: #1f2740;
  --q-accent: #DC143C;
  --q-muted: #5a6278;
  width: 100%;
}

.quizly-how-it-works svg {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
}

.quizly-how-it-works .mobile-svg {
  display: none;
}

@media (max-width: 900px) {
  .quizly-how-it-works .desktop-svg {
    display: none;
  }
  .quizly-how-it-works .mobile-svg {
    display: block;
    width: 80%;
    margin-inline: auto;
  }
}
