/* ==========================================================================
   Cuidar Agora — Central de Ajuda
   Complementa /styles.css (tokens, nav, footer, botões).
   ========================================================================== */

/* header fixo do site sobre fundo claro: versão sólida permanente */
.help-nav {
  position: sticky;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}
.help-nav .brand-word em { color: var(--primary-deep); }
.help-nav .nav-links a:hover,
.help-nav .nav-links a[aria-current="page"] { color: var(--primary-deep); opacity: 1; }

.help-main {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 2.5rem clamp(1.25rem, 4vw, 2.5rem) 5rem;
}
/* as sections do site de marketing têm padding-block enorme; aqui não */
.help-main section { padding-block: 0 1.5rem; }

/* ---------- home da central ---------- */

.help-hero { padding-block: 1.5rem 2.5rem; }
.help-hero h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 2.9rem);
  margin-bottom: 0.35em;
}
.help-hero > p { color: var(--muted); font-size: 1.1rem; }

.help-search {
  position: relative;
  max-width: 34rem;
  margin-top: 1.5rem;
}
.help-search input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.help-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-tint);
}
.help-search input::placeholder { color: var(--muted); opacity: 0.7; }

.search-results {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.search-results a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
}
.search-results a:hover { border-color: var(--primary); }
.search-results strong { display: block; font-size: 0.98rem; }
.search-results span { color: var(--muted); font-size: 0.88rem; }
.search-empty { color: var(--muted); font-size: 0.95rem; padding: 0.5rem 0.25rem; }

.help-cats {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 1rem;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.5rem 1.6rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
}
.cat-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 16px 40px rgba(13, 27, 42, 0.10);
}
.cat-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.cat-card h2 a { text-decoration: none; }
.cat-card > p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.9rem; }
.cat-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.cat-card li a {
  color: var(--primary-deep);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.cat-card li a:hover { text-decoration: underline; }

.help-roles-strip {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.help-roles-strip h2 { font-size: 1.25rem; }
.help-roles-strip p { color: var(--muted); }

/* ---------- layout de artigo ---------- */

.help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
@media (min-width: 64rem) {
  .help-layout { grid-template-columns: 16rem minmax(0, 1fr); }
}

.help-sidebar { min-width: 0; }
/* o conteúdo de um details fechado ainda participa do layout em navegadores
   com content-visibility; esconde de verdade para não alargar a página */
.help-sidebar details:not([open]) > *:not(summary) { display: none; }

.help-sidebar summary {
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 0.6rem 0;
  list-style: none;
}
.help-sidebar summary::before { content: "☰ "; }
@media (min-width: 64rem) {
  .help-sidebar { position: sticky; top: 6rem; }
  .help-sidebar summary { display: none; }
  .help-sidebar details > * { display: block; }
}
.help-sidebar nav { display: grid; gap: 1.1rem; padding-top: 0.5rem; }
.help-sidebar section { padding-block: 0; }
.help-sidebar h2 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}
.help-sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.help-sidebar a {
  display: block;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-left: 2px solid transparent;
}
.help-sidebar a:hover { color: var(--primary-deep); background: var(--primary-tint); }
.help-sidebar a[aria-current="page"] {
  color: var(--primary-deep);
  font-weight: 700;
  border-left-color: var(--primary);
  background: var(--primary-tint);
}

.crumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.crumbs a { color: var(--primary-deep); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.help-article h1 {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem);
  margin-bottom: 0.4em;
}
.help-article .lead { font-size: 1.12rem; color: var(--muted); }
.help-article h2 {
  font-size: 1.35rem;
  margin-top: 2.2em;
  padding-top: 0.4em;
}
.help-article h3 { font-size: 1.08rem; margin-top: 1.6em; }
.help-article ul, .help-article ol { max-width: 65ch; }
.help-article li { margin-bottom: 0.35rem; }
.help-article strong { color: var(--ink); }
.help-article table {
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
}
.help-article th, .help-article td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.help-article th { background: var(--surface); font-family: var(--font-display); font-weight: 600; }

/* badges de papel */
.role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0.5rem;
}
.role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.22rem 0.75rem;
  background: var(--primary-tint);
  color: var(--primary-deep);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}

/* passo a passo */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 1.25rem 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  max-width: none;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.steps > li > strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.steps p { margin-bottom: 0.5em; }

/* screenshots */
.shot {
  margin: 1.25rem 0 1.75rem;
}
.steps .shot { margin-top: 0.9rem; }
.shot img {
  display: block;
  width: 100%;
  max-width: 46rem;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: 0 10px 30px rgba(13, 27, 42, 0.10);
  background: #F8FAFC;
}
.shot figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  max-width: 46rem;
}

/* callouts */
.callout {
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  background: var(--primary-tint);
  border-radius: 0.9rem;
  padding: 0.9rem 1.2rem;
  margin: 1.25rem 0;
  max-width: 46rem;
  font-size: 0.97rem;
}
.callout > p:last-child { margin-bottom: 0; }
.callout strong:first-child { font-family: var(--font-display); }
.callout-warn {
  border-color: rgba(197, 138, 4, 0.35);
  background: rgba(197, 138, 4, 0.10);
}
.callout-danger {
  border-color: rgba(209, 67, 67, 0.35);
  background: rgba(209, 67, 67, 0.08);
}

/* rótulos de interface citados no texto */
.ui {
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.92em;
  white-space: nowrap;
}

/* navegação entre artigos no fim */
.article-nav {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.95rem;
}
.article-nav a { color: var(--primary-deep); font-weight: 600; text-decoration: none; }
.article-nav a:hover { text-decoration: underline; }
