/*
 * Help center (/help/). Pages are generated by scripts/build-help.mjs.
 * Shared pieces (tokens, buttons, top bar, footer) are in /styles.css.
 */

.help-page main {
  min-height: 70vh;
}

/* ---------- /help/ home ---------- */

.help-hero {
  padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
  text-align: center;
  background:
    radial-gradient(60% 90% at 85% 0%, rgba(92, 242, 199, 0.22), transparent 70%),
    radial-gradient(50% 80% at 10% 10%, rgba(255, 138, 92, 0.12), transparent 70%);
}

.help-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.35;
}

.help-hero p {
  max-width: 36rem;
  margin: 10px auto 0;
  color: var(--ink-2);
  font-size: 1.08rem;
}

.help-search {
  max-width: 38rem;
  margin: 26px auto 0;
}

.help-search input {
  width: 100%;
  min-height: 60px;
  padding: 0 52px 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f8482' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat right 20px center / 22px;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  box-shadow: 0 0 0 1px rgba(3, 40, 42, 0.08), 0 20px 40px -24px rgba(3, 40, 42, 0.45);
}

.help-search input:focus-visible {
  outline: 3px solid var(--teal-bright);
  outline-offset: 2px;
}

.help-empty {
  margin-top: 14px !important;
}

.help-groups {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  padding-block: 12px clamp(64px, 8vw, 100px);
}

.help-group h2 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 900;
}

.help-group > p {
  margin-top: 2px;
  color: var(--ink-3);
}

.help-group ul {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.help-card a,
.help-related a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--white);
  color: inherit;
  text-decoration: none;
  box-shadow: inset 0 1px 0 var(--white), 0 0 0 1px rgba(3, 40, 42, 0.06), 0 18px 40px -32px rgba(3, 40, 42, 0.5);
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
}

.help-card a:hover,
.help-related a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1.5px rgba(13, 115, 119, 0.35), 0 24px 44px -30px rgba(13, 115, 119, 0.55);
}

.help-card strong,
.help-related strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
}

.help-card span,
.help-related span {
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.6;
}

@media (min-width: 760px) {
  .help-group ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .help-group ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- article ---------- */

.help-layout {
  display: grid;
  gap: 28px;
  padding-block: clamp(24px, 4vw, 48px) clamp(64px, 8vw, 100px);
}

.help-side {
  display: none;
}

.help-article {
  min-width: 0;
  max-width: 46rem;
}

.help-article h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 900;
  line-height: 1.4;
}

.help-lede {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 1.12rem;
}

.help-updated {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.88rem;
}

.help-toc {
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(3, 40, 42, 0.06);
}

.help-toc p {
  color: var(--ink-3);
  font-size: 0.9rem;
  font-weight: 700;
}

.help-toc ol {
  display: grid;
  gap: 2px;
  margin-top: 6px;
}

.help-toc a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--teal-ink);
  font-weight: 600;
  text-decoration: none;
}

.help-toc a:hover {
  text-decoration: underline;
}

.help-body {
  margin-top: 8px;
  font-size: 1.05rem;
  line-height: 1.9;
}

.help-body h2 {
  margin-top: 40px;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 900;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.help-body h3 {
  margin-top: 24px;
  font-size: 1.15rem;
  font-weight: 800;
}

.help-body p,
.help-body ul,
.help-body figure,
.help-body aside {
  margin-top: 14px;
}

.help-body ul {
  padding-inline-start: 22px;
  list-style: disc;
}

.help-body ul li + li {
  margin-top: 6px;
}

.help-body a {
  color: var(--teal-ink);
  font-weight: 600;
  text-underline-offset: 4px;
}

.help-body code {
  padding: 1px 7px;
  border-radius: 7px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(3, 40, 42, 0.1);
  font-family: var(--num), ui-monospace, monospace;
  font-size: 0.92em;
}

/* Numbered steps: a teal number in a circle beside each step. */
.help-steps {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  counter-reset: step;
}

.help-steps li {
  position: relative;
  padding: 14px 18px;
  padding-inline-start: 62px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(3, 40, 42, 0.06), 0 14px 30px -28px rgba(3, 40, 42, 0.5);
  counter-increment: step;
}

.help-steps li::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  inset-inline-start: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  color: var(--white);
  background: radial-gradient(120% 120% at 30% 0%, #1fb3ae, var(--teal) 70%);
  font-family: var(--num);
  font-size: 0.95rem;
  font-weight: 800;
}

.help-shot {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  padding: 8px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(3, 40, 42, 0.08), 0 30px 60px -36px rgba(3, 40, 42, 0.5);
}

.help-shot img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.help-note {
  padding: 14px 18px;
  border-radius: 16px;
  border-inline-start: 4px solid var(--teal);
  background: rgba(92, 242, 199, 0.14);
}

.help-note.warn {
  border-color: var(--action);
  background: rgba(255, 107, 53, 0.1);
}

.help-note p {
  margin: 0;
}

.help-ask {
  margin-top: 48px;
  padding: 24px;
  border-radius: 24px;
  color: var(--white);
  background: radial-gradient(90% 80% at 90% 0%, #0d5558 0%, var(--deep) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.help-ask h2 {
  font-size: 1.3rem;
  font-weight: 900;
}

.help-ask p {
  margin: 6px 0 16px;
  color: #bfe0da;
}

.help-related {
  margin-top: 40px;
}

.help-related h2 {
  font-size: 1.2rem;
  font-weight: 900;
}

.help-related ul {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.help-next {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 20px;
  color: inherit;
  text-align: end;
  text-decoration: none;
  box-shadow: 0 0 0 1.5px rgba(13, 115, 119, 0.25);
  transition: background-color 0.2s;
}

.help-next:hover {
  background: var(--white);
}

.help-next span {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.help-next strong {
  color: var(--teal-ink);
  font-family: var(--display);
  font-weight: 800;
}

@media (min-width: 760px) {
  .help-related ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1020px) {
  .help-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }

  .help-side {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    display: block;
  }

  .help-back {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    color: var(--teal-ink);
    font-weight: 700;
    text-decoration: none;
  }

  .help-side-title {
    margin-top: 12px;
    color: var(--ink-3);
    font-size: 0.88rem;
    font-weight: 700;
  }

  .help-side ul {
    display: grid;
    gap: 2px;
    margin-top: 6px;
  }

  .help-side ul a {
    display: block;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--ink-2);
    font-size: 0.95rem;
    line-height: 1.5;
    text-decoration: none;
  }

  .help-side ul a:hover {
    background: rgba(3, 40, 42, 0.05);
  }

  .help-side ul a[aria-current="page"] {
    color: var(--white);
    background: var(--deep);
    font-weight: 700;
  }
}
