/* Joblancer candidate how-to guide: contents rail, numbered steps, real screenshots and FAQ.
   Base styles come from /help/help.css (header, footer, tokens). */

.howto { padding-bottom: 3.5rem; }
.howto h1 { margin-bottom: 0.6rem; }
.howto .intro { margin-bottom: 2rem; }

/* Two columns on desktop: a sticky contents rail on the left, the steps on the right */
.howto-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.howto-main { min-width: 0; }

.toc {
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 14px;
  padding: 1.1rem 1.25rem 0.9rem;
}
.toc h2 { font-size: 1rem; color: #1a1a1a; margin-bottom: 0.5rem; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; font-size: 0.93rem; margin: 0.4rem 0; padding-left: 1.6rem; position: relative; line-height: 1.4; }
.toc li::before { content: counter(toc); position: absolute; left: 0; top: 0; color: #1d4ed8; font-weight: 700; }
.toc a { color: #222; text-decoration: none; }
.toc a:hover, .toc a:focus-visible { color: #1d4ed8; text-decoration: underline; }

/* Each step is a card-free section with a rule above it */
.step { padding: 2rem 0 1.5rem; border-top: 1px solid #e1e8ed; scroll-margin-top: 90px; }
.step:first-child { border-top: none; padding-top: 0.5rem; }
.step h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.5rem;
  line-height: 1.25;
  color: #1a1a1a;
  margin-bottom: 0.9rem;
}
.step-no {
  flex: 0 0 2.1rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #1d4ed8;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.howto p { color: #444; font-size: 1rem; line-height: 1.6; margin: 0.6rem 0; }
.howto ul, .howto ol.steps { color: #444; margin: 0.6rem 0 0.6rem 1.3rem; }
.howto li { margin: 0.35rem 0; line-height: 1.55; }
.howto ol.steps { list-style: decimal; }
.howto ol.steps > li::marker { font-weight: 700; color: #1d4ed8; }
.howto ul ul { margin-top: 0.3rem; }
.howto strong { color: #1a1a1a; }
.howto em { font-style: italic; }

.tip {
  background: #fff;
  border-left: 3px solid #1d4ed8;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.96rem;
  color: #444;
}

/* Screenshots: one desktop picture, phone pictures beside it when there is room */
.figs { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; margin: 1.25rem 0; }
.figs figure { margin: 0; }
.figs figure:not(.figure-phone) { flex: 1 1 520px; min-width: 0; }
.figs figure.figure-phone { flex: 0 0 230px; }
.figs img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e1e8ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 40, 80, 0.06);
}
.figure-phone img { border-radius: 22px; }
.figure-phone img { max-width: 230px; }
.howto > .howto-layout figure { margin: 1.25rem 0; }
.howto > .howto-layout figure figcaption,
.figs figcaption { font-size: 0.9rem; color: #666; margin-top: 0.5rem; line-height: 1.45; }
.howto figure img { display: block; width: 100%; height: auto; border: 1px solid #e1e8ed; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(20, 40, 80, 0.06); }

/* Questions */
.faq { padding-top: 1.5rem; border-top: 1px solid #e1e8ed; }
.faq h2 { font-size: 1.5rem; color: #1a1a1a; margin-bottom: 0.6rem; }
.faq details { border-bottom: 1px solid #e1e8ed; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 2rem 0.85rem 0;
  position: relative;
  font-weight: 600;
  color: #222;
  font-size: 1rem;
  line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0.25rem; top: 0.7rem; font-size: 1.3rem; font-weight: 400; color: #1d4ed8; }
.faq details[open] summary::after { content: '\2212'; }
.faq summary:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; border-radius: 4px; }
.faq details p { padding: 0 0 1rem; }

.howto-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.help .help-btn-light { background: #fff; color: #1d4ed8; border: 1px solid #1d4ed8; }
.help .help-btn-light:hover { background: #eef4ff; }

@media (min-width: 960px) {
  .howto-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; align-items: start; }
  .toc { position: sticky; top: 96px; }
}

/* Phones: 16px gutter, screenshots stack, no horizontal scroll */
@media (max-width: 760px) {
  .howto h1 { font-size: 1.85rem; }
  .step h2 { font-size: 1.3rem; }
  .figs figure:not(.figure-phone) { flex-basis: 100%; }
  .figs figure.figure-phone { flex-basis: 230px; }
}
