/* Help centre (/centrum, community.js). Builds on panel.css. Namespaced "hc-". */

.hc-page {
  --hc-line: rgba(255, 255, 255, 0.07);
  --hc-muted: rgba(245, 238, 231, 0.55);
  --hc-amber: #f3c58f;
  max-width: 1080px;
}

.hc-page [hidden],
.hc-dialog [hidden] {
  display: none !important;
}

/* ---------- Hero and search ---------- */

.hc-hero {
  position: relative;
  padding: 44px 40px 34px;
  margin-bottom: 18px;
  border-radius: 24px;
  border: 1px solid rgba(232, 168, 97, 0.18);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(232, 168, 97, 0.16), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(123, 154, 237, 0.08), transparent 60%),
    rgba(14, 13, 12, 0.92);
  text-align: center;
  overflow: hidden;
}

.hc-hero h1 {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  color: #faf7f3;
}

.hc-hero .pn-lead {
  margin: 0 auto 26px;
}

.hc-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  height: 58px;
  margin: 0 auto;
  padding: 0 14px 0 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 6, 6, 0.8);
  color: rgba(245, 238, 231, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: border-color .2s, box-shadow .2s;
}

.hc-search:focus-within {
  border-color: rgba(232, 168, 97, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(232, 168, 97, 0.12);
  color: var(--hc-amber);
}

.hc-page .hc-search input#hc-search,
.hc-page .hc-search input#hc-search:focus {
  flex: 1;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 0;
  height: 100%;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: #faf7f3;
  font: inherit;
  font-size: 16px;
}

.hc-search input::placeholder {
  color: rgba(245, 238, 231, 0.38);
}

.hc-search input::-webkit-search-cancel-button {
  filter: invert(0.7);
}

.hc-search kbd {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(245, 238, 231, 0.45);
  font: inherit;
  font-size: 12px;
}

.hc-popular {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--hc-muted);
}

.hc-popular button {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hc-line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 238, 231, 0.8);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.hc-popular button:hover {
  border-color: rgba(232, 168, 97, 0.45);
  color: #fff;
}

.hc-editor-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed rgba(232, 168, 97, 0.25);
}

/* ---------- Shortcuts ---------- */

.hc-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.hc-shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--hc-line);
  background: rgba(14, 13, 12, 0.9);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, transform .2s, background-color .2s;
}

.hc-shortcut:hover {
  border-color: rgba(232, 168, 97, 0.4);
  background: rgba(232, 168, 97, 0.05);
  transform: translateY(-2px);
}

.hc-shortcut-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(232, 168, 97, 0.12);
  color: var(--hc-amber);
}

.hc-shortcut strong {
  display: block;
  font-size: 14px;
  color: #faf7f3;
}

.hc-shortcut small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--hc-muted);
}

/* ---------- Known-issue strip ---------- */

.hc-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  font-size: 14px;
  color: #f8dcae;
}

.hc-status > span:nth-child(2) {
  flex: 1;
}

.hc-pulse {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f5b041;
  box-shadow: 0 0 0 0 rgba(245, 176, 65, 0.6);
  animation: hc-pulse 2s infinite;
}

@keyframes hc-pulse {
  70% { box-shadow: 0 0 0 10px rgba(245, 176, 65, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 176, 65, 0); }
}

/* ---------- Tabs ---------- */

.hc-tabs {
  position: sticky;
  top: calc(var(--sn-h, 72px) + 8px);
  z-index: 5;
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--hc-line);
  background: rgba(14, 12, 11, 0.96);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-margin-top: calc(var(--sn-h, 72px) + 20px);
}

.hc-tabs::-webkit-scrollbar {
  display: none;
}

.hc-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(245, 238, 231, 0.65);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.hc-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.hc-tab[aria-selected="true"] {
  color: #1b1009;
  background: linear-gradient(135deg, #f3c58f, #e8a861);
}

.hc-tab span {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

.hc-tab[aria-selected="true"] span {
  background: rgba(27, 16, 9, 0.18);
}

.hc-tab.has-alert span {
  color: #1d1306;
  background: #f5b041;
}

/* ---------- Sections and cards ---------- */

.hc-section + .hc-section {
  margin-top: 34px;
}

.hc-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hc-section-head h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #faf7f3;
}

.hc-more-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--hc-amber);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.hc-more-link:hover {
  text-decoration: underline;
}

.hc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.hc-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hc-card,
.hc-event,
.hc-issue {
  min-width: 0;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--hc-line);
  background: rgba(14, 13, 12, 0.92);
}

.hc-card {
  display: flex;
  flex-direction: column;
}

.hc-card h3,
.hc-event h3,
.hc-issue h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #faf7f3;
  overflow-wrap: anywhere;
}

.hc-card p,
.hc-event p,
.hc-issue p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 238, 231, 0.7);
  overflow-wrap: anywhere;
}

.hc-card .hc-row-actions {
  margin-top: auto;
  padding-top: 14px;
}

.hc-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--hc-muted);
}

.hc-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hc-amber);
  background: rgba(232, 168, 97, 0.12);
}

.hc-badge.is-event { color: #c9b3ff; background: rgba(147, 70, 229, 0.16); }
.hc-badge.is-recruitment { color: #9fefb5; background: rgba(123, 237, 154, 0.12); }
.hc-badge.is-wl { color: #aec2f7; background: rgba(123, 154, 237, 0.14); }
.hc-badge.is-issue { color: #f5c26b; background: rgba(245, 158, 11, 0.12); }
.hc-badge.is-faq { color: rgba(245, 238, 231, 0.75); background: rgba(255, 255, 255, 0.06); }
.hc-badge.is-muted { color: rgba(245, 238, 231, 0.5); background: rgba(255, 255, 255, 0.05); }

.hc-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 12px;
}

.hc-row-actions:empty {
  display: none;
}

.hc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hc-amber);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.hc-link:hover {
  color: #fff;
}

.hc-link svg {
  transition: transform .2s;
}

.hc-link:hover svg {
  transform: translateX(3px);
}

.hc-edit,
.hc-copy {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(245, 238, 231, 0.45);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.hc-edit:hover,
.hc-copy:hover {
  color: #fff;
}

.hc-muted {
  font-size: 12.5px;
  color: rgba(245, 238, 231, 0.4);
}

/* "Read more" inside cards */
.hc-more {
  margin-top: 10px;
}

.hc-more summary {
  display: inline-flex;
  color: var(--hc-amber);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.hc-more summary::-webkit-details-marker {
  display: none;
}

.hc-more[open] summary {
  margin-bottom: 8px;
}

.hc-more-body {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(250, 247, 243, 0.82);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- FAQ accordion ---------- */

.hc-faqs {
  border-radius: 18px;
  border: 1px solid var(--hc-line);
  background: rgba(14, 13, 12, 0.92);
  overflow: hidden;
}

.hc-faq + .hc-faq {
  border-top: 1px solid var(--hc-line);
}

.hc-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #faf7f3;
  cursor: pointer;
  list-style: none;
  transition: background-color .2s;
}

.hc-faq summary::-webkit-details-marker {
  display: none;
}

.hc-faq summary:hover {
  background: rgba(255, 255, 255, 0.025);
}

.hc-chevron {
  flex: 0 0 auto;
  color: rgba(245, 238, 231, 0.45);
  transition: transform .25s, color .2s;
}

.hc-faq[open] .hc-chevron {
  transform: rotate(180deg);
  color: var(--hc-amber);
}

.hc-faq[open] summary {
  color: var(--hc-amber);
}

.hc-faq-body {
  padding: 0 22px 20px;
}

.hc-faq-body p {
  margin: 0;
  max-width: 760px;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(245, 238, 231, 0.75);
}

.hc-faq:target,
.hc-faq[open]:target {
  background: rgba(232, 168, 97, 0.05);
}

/* ---------- Calendar ---------- */

.hc-event {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
}

.hc-event.is-past {
  opacity: .55;
}

.hc-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 70px;
  border-radius: 14px;
  border: 1px solid rgba(232, 168, 97, 0.3);
  background: rgba(232, 168, 97, 0.08);
}

.hc-date strong {
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-size: 24px;
  line-height: 1;
  color: #faf7f3;
}

.hc-date span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hc-amber);
}

/* ---------- Known issues ---------- */

.hc-issue {
  border-left: 3px solid #f5b041;
}

.hc-issue.is-in_progress {
  border-left-color: #7b9aed;
}

.hc-issue.is-resolved {
  border-left-color: #58d27c;
  opacity: .75;
}

.hc-issue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hc-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #f5c26b;
  background: rgba(245, 158, 11, 0.14);
}

.hc-state.is-in_progress { color: #aec2f7; background: rgba(123, 154, 237, 0.16); }
.hc-state.is-resolved,
.hc-state.is-published { color: #9fefb5; background: rgba(123, 237, 154, 0.12); }
.hc-state.is-draft { color: rgba(245, 238, 231, 0.6); background: rgba(255, 255, 255, 0.07); }

/* ---------- Empty and loading ---------- */

.hc-empty {
  padding: 38px 24px;
  border-radius: 18px;
  border: 1px dashed rgba(232, 168, 97, 0.25);
  text-align: center;
}

.hc-empty strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  color: #faf7f3;
}

.hc-empty p {
  max-width: 460px;
  margin: 0 auto 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--hc-muted);
}

.hc-results {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--hc-muted);
}

.hc-loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hc-loading span {
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  background-size: 200% 100%;
  animation: hc-shimmer 1.4s ease-in-out infinite;
}

@keyframes hc-shimmer {
  to { background-position: -200% 0; }
}

/* ---------- Bottom: whitelist prep and contact ---------- */

.hc-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-top: 40px;
  scroll-margin-top: calc(var(--sn-h, 72px) + 20px);
}

.hc-prep,
.hc-contact {
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--hc-line);
  background: rgba(14, 13, 12, 0.92);
}

.hc-prep {
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(232, 168, 97, 0.1), transparent 60%),
    rgba(14, 13, 12, 0.92);
}

.hc-prep h2,
.hc-contact h2 {
  margin: 0 0 12px;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-size: 21px;
  color: #faf7f3;
}

.hc-contact p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 238, 231, 0.7);
}

.hc-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.hc-steps li {
  position: relative;
  padding-left: 38px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(245, 238, 231, 0.72);
  counter-increment: step;
}

.hc-steps li + li {
  margin-top: 12px;
}

.hc-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(232, 168, 97, 0.14);
  color: var(--hc-amber);
  font-size: 13px;
  font-weight: 700;
}

.hc-steps strong {
  color: #faf7f3;
}

.hc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- Editor dialogs ---------- */

.hc-dialog {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 680px;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(232, 168, 97, 0.28);
  background: #110e0c;
  color: #faf7f3;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: auto;
}

.hc-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.hc-dialog form,
.hc-admin-list {
  padding: 0 24px 22px;
}

.hc-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -24px 18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--hc-line, rgba(255, 255, 255, 0.07));
  background: #110e0c;
}

#hc-drafts .hc-dialog-head {
  margin: 0 0 14px;
}

.hc-dialog-head h2 {
  margin: 0;
  font-size: 19px;
}

.hc-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(245, 238, 231, 0.7);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.hc-close:hover {
  color: #fff;
}

.hc-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 238, 231, 0.85);
}

.hc-field small {
  font-weight: 400;
  color: rgba(245, 238, 231, 0.45);
}

.hc-dialog .pn-input,
.hc-dialog .pn-textarea,
.hc-dialog .pn-select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 6, 6, 0.75);
  color: #faf7f3;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}

.hc-dialog .pn-select {
  height: 42px;
  padding: 0 12px;
}

.hc-dialog .pn-textarea {
  min-height: 0;
  resize: vertical;
  line-height: 1.6;
}

.hc-dialog input[type="datetime-local"] {
  color-scheme: dark;
}

.hc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.hc-form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(237, 123, 123, 0.35);
  background: rgba(237, 123, 123, 0.08);
  font-size: 13px;
  color: #f4b8b8;
}

.hc-dialog-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}

.hc-spacer {
  flex: 1;
}

.hc-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hc-admin-row .hc-card-meta {
  margin-bottom: 4px;
}

.hc-admin-row strong {
  font-size: 14px;
}

.hc-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(123, 237, 154, 0.3);
  background: rgba(16, 30, 20, 0.96);
  color: #c8f5d4;
  font-size: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s, transform .2s;
}

.hc-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hc-toast.is-error {
  border-color: rgba(237, 123, 123, 0.35);
  background: rgba(40, 14, 14, 0.96);
  color: #f9c6c6;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
  .hc-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hc-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .hc-hero {
    padding: 30px 18px 24px;
    border-radius: 20px;
  }

  .hc-search {
    height: 52px;
    padding: 0 10px 0 14px;
  }

  .hc-search kbd {
    display: none;
  }

  .hc-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hc-shortcut {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }

  .hc-shortcut-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .hc-faq summary {
    padding: 16px 16px;
    font-size: 14.5px;
  }

  .hc-faq-body {
    padding: 0 16px 18px;
  }

  .hc-event {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .hc-date {
    height: 58px;
  }

  .hc-date strong {
    font-size: 20px;
  }

  .hc-card,
  .hc-issue {
    padding: 16px;
  }

  .hc-prep,
  .hc-contact {
    padding: 20px;
  }

  .hc-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hc-dialog form,
  .hc-admin-list {
    padding: 0 16px 18px;
  }

  .hc-dialog-head {
    margin: 0 -16px 16px;
    padding: 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hc-pulse,
  .hc-loading span {
    animation: none;
  }

  .hc-shortcut:hover {
    transform: none;
  }
}
