/* Page layout — unlayered so it beats the Tailwind reset */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
#pg-nav {
  padding-inline: 1.5rem;
  border-bottom: 1px solid var(--color-base-300);
  gap: 1rem;
}
#pg-nav .pg-title {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
#pg-nav .pg-toggles {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
}
#pg-nav .pg-toggles label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
}
#pg-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
#pg-sidebar {
  width: 15rem;
  flex-shrink: 0;
  overflow-y: auto;
  background: var(--color-base-100);
  border-right: 1px solid var(--color-base-300);
}
#pg-sidebar .menu {
  padding: 0.75rem;
  font-size: 0.875rem;
}
#pg-main {
  flex: 1;
  overflow-y: auto;
  background: oklch(from var(--color-base-200) l c h / 0.4);
}
#pg-content {
  max-width: 64rem;
  margin-inline: auto;
  padding: 2.5rem 2rem;
}
#pg-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem;
}
/* Component heading */
.pg-heading {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-base-300);
}
/* Section */
.pg-section {
  margin-bottom: 3rem;
}
.pg-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.pg-hash {
  opacity: 0.3;
}
.pg-edit-link {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0;
  text-decoration: none;
  color: inherit;
}
.pg-section-title:hover .pg-edit-link {
  opacity: 0.5;
}
.pg-edit-link:hover {
  opacity: 1 !important;
  text-decoration: underline;
}
/* Tab content overrides */
.pg-preview {
  padding: 2.5rem;
  background: var(--color-base-100);
  border-color: var(--color-base-300);
}
.pg-preview-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.pg-code {
  border-color: var(--color-base-300);
  overflow: hidden;
}
.pg-code code-editor {
  display: block;
  height: 20rem;
}
.pg-hidden { display: none !important; }
