/* Help site — reuses base.css's color tokens/cards for visual consistency
   with the rest of the app, this file just adds the wider reading layout,
   nav, and diagram styling specific to the guide. */

body {
  background: var(--color-light);
}

.help-header {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.help-brand {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  /* Truncate rather than squeeze the lang-toggle off a narrow screen —
     see header.app-header h1's identical fix in base.css. */
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-brand .text-muted {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.help-nav a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--color-light);
  color: var(--color-dark);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.help-nav a:hover {
  background: #d9ecdf;
}

.help-nav a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.help-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.help-main h1 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.help-main h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
  color: var(--color-dark);
}

.help-main p {
  margin: 0 0 1rem;
  line-height: 1.6;
}

.help-lede {
  font-size: 1.05rem;
  color: var(--color-muted);
}

.help-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.help-tip {
  background: var(--color-light);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.help-step-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  counter-reset: help-step;
}

.help-step-list li {
  counter-increment: help-step;
  position: relative;
  padding: 0.3rem 0 0.3rem 2.5rem;
  margin-bottom: 0.5rem;
}

.help-step-list li::before {
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .help-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.help-grid a.help-card {
  color: inherit;
  text-decoration: none;
  display: block;
}
.help-grid a.help-card:hover {
  box-shadow: 0 2px 10px rgba(15, 61, 30, 0.14);
}
.help-grid a.help-card h3 {
  margin: 0 0 0.3rem;
  color: var(--color-primary);
}
.help-grid a.help-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.help-diagram {
  width: 100%;
  height: auto;
  margin: 1rem 0;
}

/* A live-rendered "screenshot" of the real admin UI (same markup/CSS/JS the
   app itself uses, just fed sample data instead of a real team's) — desktop
   only. Mobile readers get the same text-only guide the mobile app itself
   is built mobile-first for; there's no room to show a desktop-width
   mockup faithfully on a phone screen, so it's simplest to just not try. */
.help-screenshot {
  display: none;
}
@media (min-width: 860px) {
  .help-screenshot {
    display: block;
    margin: 1.5rem 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: var(--color-light);
  }
  .help-screenshot-bar {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: #e3e8ea;
    border-bottom: 1px solid var(--color-border);
  }
  .help-screenshot-bar span {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: #c7ccce;
  }
  .help-screenshot-body {
    padding: 1.25rem;
    font-size: 0.85rem;
  }
  .help-screenshot-body .card {
    margin-bottom: 0.75rem;
  }
  .help-screenshot-body .card:last-child {
    margin-bottom: 0;
  }
  /* Non-interactive — this is a mockup, not a real control. */
  .help-screenshot-body button,
  .help-screenshot-body select,
  .help-screenshot-body input,
  .help-screenshot-body a {
    pointer-events: none;
  }
}

.help-faq-item {
  padding: 0;
  overflow: hidden;
}

.help-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.help-faq-item summary::-webkit-details-marker {
  display: none;
}
.help-faq-item summary::after {
  content: "+";
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-muted);
  flex-shrink: 0;
}
.help-faq-item[open] summary::after {
  content: "–";
}

.help-faq-question {
  flex: 1 1 auto;
}

.help-faq-tag {
  flex-shrink: 0;
  background: var(--color-light);
  color: var(--color-muted);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.help-faq-answer {
  padding: 0 1.25rem 1.25rem;
}
.help-faq-answer p {
  margin: 0 0 0.75rem;
}
.help-faq-answer p:last-of-type {
  margin-bottom: 0;
}

.help-faq-copy {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  margin-top: 0.5rem;
  border-radius: var(--radius);
  color: var(--color-muted);
}
.help-faq-copy:hover {
  background: var(--color-light);
}

@keyframes help-faq-highlight {
  from {
    background: #fff3cd;
  }
  to {
    background: var(--color-white);
  }
}
.help-faq-item.help-faq-highlight {
  animation: help-faq-highlight 1.5s ease-out;
}

.help-back {
  display: inline-block;
  margin-top: 2rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}
