/* The help centre reading layout. Tokens come from `_style.css`; this is
   distinct from `_doc.css`, the legal documents' layout. A surface that
   works, so it stays white - moves and reasons in
   `.claude/skills/help-page/SKILL.md`, measurements in
   `docs/design/help-centers.md`. */

.help {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}

/* --- crumbs and heads --------------------------------------------------- */

.help .crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 26px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.help .crumbs a { color: var(--muted); text-decoration: none; }
.help .crumbs a:hover { color: var(--ink); text-decoration: underline; }
.help .crumbs span[aria-hidden] { opacity: .5; }

/* Only the title and the search are centred: a category page is a list of
   titles a reader runs their eye down, and a ragged left edge slows that.
   The count sits with the title, as the header's second line. */
.help > header { padding: 18px 0 4px; text-align: center; }

.help h1 {
  font-size: clamp(30px, 4.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0;
}

.help .count { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* --- search ------------------------------------------------------------- */

/* Scoped to the whole library, and the one control at the top of the page.
   All three references put search first and it is the only thing on a help
   home page that answers a question nobody anticipated. */
.help-search { margin: 22px 0 34px; position: relative; }

.help-search input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  text-align: center;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.help-search input:hover { border-color: var(--stroke); }

.help-search input:focus-visible {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.help-results { margin: 14px 0 0; }
.help-results ol { list-style: none; margin: 0; padding: 0; }

.help-results li { border-bottom: 1px solid var(--divider); }

.help-results a {
  display: block;
  padding: 14px 2px;
  text-decoration: none;
}

.help-results .where {
  font-size: 13px;
  color: var(--faint);
  margin: 0 0 3px;
}

.help-results .what { font-weight: 600; margin: 0; }
.help-results a:hover .what { color: var(--accent); }
.help-results .none { color: var(--muted); margin: 14px 2px; }

/* --- category cards ----------------------------------------------------- */

.help-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0 0 44px;
}

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

/* A raised surface is white plus a hairline. Never a tinted fill. */
.help-card {
  display: block;
  padding: 22px 24px 20px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--ground);
  text-decoration: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}

.help-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.help-card h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.help-card p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }

.help-card .inside {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--faint);
  line-height: 1.5;
}

/* --- section grid on a category page ------------------------------------ */

/* **Columns rather than a grid**, because a grid's row height is its tallest
   cell: eight sections of five to eight articles left a hundred and twenty
   points of white under every short one. Columns flow, so a section starts
   where the one above it ended. */
.help-sections { margin: 30px 0 0; }

.help-sections > section { margin: 0 0 34px; break-inside: avoid; }

@media (min-width: 860px) {
  .help-sections { columns: 2; column-gap: 48px; }
}

.help-sections h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -.02em;
}

.help-sections ul { list-style: none; margin: 0; padding: 0; }
.help-sections li { border-top: 1px solid var(--divider); }

.help-sections li a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
}

.help-sections .what { margin: 0; font-weight: 600; font-size: 16px; }
.help-sections li a:hover .what { color: var(--accent); }

/* Bumble's move, and the difference between scanning four titles and reading
   four answers - see `docs/design/help-centers.md`. */
.help-sections .why { margin: 2px 0 0; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* One entry article per section, the way Hinge and Bumble both mark one. It
   answers "where do I start" without a sentence of instruction. */
.help-sections .start .what::after {
  content: 'Start here';
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  vertical-align: 2px;
}

.help-sections .rest { margin: 10px 0 0; font-size: 14px; }
.help-sections .rest a { color: var(--accent); text-decoration: none; font-weight: 600; }
.help-sections .rest a:hover { text-decoration: underline; }

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

.help-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  margin: 8px 0 0;
}

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

.help-body { max-width: 40rem; }
.help-body h1 { text-align: center; }
.help-body .answer { font-size: 19px; line-height: 1.55; margin: 14px 0 0; }
.help-body p { color: var(--ink-2); }
.help-body ol, .help-body ul { padding-left: 22px; }
.help-body li { color: var(--ink-2); margin: 8px 0; }
.help-body a { color: var(--accent); }

/* The one exit, and there is one of it. A dead end is Hinge's mistake and the
   clearest own goal in the teardown. */
.help-body .then {
  margin: 28px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--ground);
  color: var(--ink);
}

.help-body .updated { margin: 26px 0 0; font-size: 14px; color: var(--faint); }

.help-side h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
}

.help-side ul { list-style: none; margin: 0; padding: 0; }
.help-side li { border-top: 1px solid var(--divider); }
.help-side a { display: block; padding: 11px 0; font-size: 15px; text-decoration: none; color: var(--ink-2); }
.help-side a:hover { color: var(--accent); }
.help-side .here { font-weight: 600; color: var(--ink); }

@media (min-width: 900px) {
  .help-side { position: sticky; top: 92px; }
}

/* --- popular, safety and contact ---------------------------------------- */

.help-block { margin: 0 0 40px; }
.help-block h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 10px; }

.help-popular ul { list-style: none; margin: 0; padding: 0; }
.help-popular li { border-top: 1px solid var(--divider); }
.help-popular li:last-child { border-bottom: 1px solid var(--divider); }
.help-popular a { display: block; padding: 13px 2px; text-decoration: none; font-weight: 600; }
.help-popular a:hover { color: var(--accent); }

.help-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

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

.help-panel {
  padding: 22px 24px;
  border: 1px solid var(--rule);
  border-radius: 18px;
}

.help-panel h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.02em; }
.help-panel p { margin: 0 0 6px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.help-panel a { color: var(--accent); }
.help-panel p:last-child { margin-bottom: 0; }
