/* EnemoAi How-To Guide: builds on /ui.css (tokens, buttons, header, footer). */
.wrap { max-width: 860px; }
.gnav { display: flex; align-items: center; gap: var(--s2); }
.gnav > a:not(.btn) { color: var(--fg); text-decoration: none; font-size: .92rem; padding: 10px 8px; }
.gnav > a:not(.btn):hover { color: var(--blue); }
@media (max-width: 420px) { .gnav > a:not(.btn) { display: none; } .brand .word { height: 15px; } }
main { padding-bottom: var(--s7); }
h1 { font-weight: 600; font-size: var(--t-2xl); line-height: 1.15; margin: var(--s7) 0 var(--s2); }
.lede { color: var(--muted); font-size: 1.08rem; margin: 0 0 var(--s6); max-width: 640px; }
.crumbs { font-size: .82rem; color: var(--muted); margin: var(--s6) 0 0; }
.crumbs a { color: var(--muted); }
.crumbs + h1 { margin-top: var(--s2); }
main h2 { font-weight: 600; font-size: var(--t-lg); margin: var(--s7) 0 var(--s3); scroll-margin-top: 80px; }
main p, main li, main dd { font-size: 1rem; }
kbd { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--panel); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; }

/* index */
.search { position: sticky; top: 64px; z-index: 3; background: var(--bg); padding: var(--s2) 0; }
.search input { font-size: 1rem; padding: 0 14px; min-height: var(--tap); background: var(--surface); }
.group h2 { font-family: var(--sans); font-weight: 750; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: var(--s6) 0 var(--s3); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
/* No tile is left alone on a row (#121): the last row shares the full width, whatever the count. */
@media (min-width: 560px) and (max-width: 799px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 800px) {
  .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cards > li { grid-column: span 2; }
  .cards > li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .cards > li:nth-last-child(2):nth-child(3n+1), .cards > li:nth-last-child(2):nth-child(3n+1) + li { grid-column: span 3; }
}
.cards a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .15s; }
.cards a:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--fg); }
.cards b { font-weight: 600; line-height: 1.35; }
.cards span { color: var(--muted); font-size: .88rem; line-height: 1.45; }

/* article */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }
.fact { background: var(--panel); border-radius: var(--r-lg); padding: var(--s4) 18px; }
.fact h2 { font-family: var(--sans); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 750; margin: 0 0 6px; }
.fact p, .fact ul { margin: 0; }
.fact ul { padding-inline-start: 18px; }
.steps-list { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps-list > li { counter-increment: s; position: relative; padding: 0 0 var(--s5); padding-inline-start: 46px; }
.steps-list > li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff;
  font-weight: 700; font-size: .9rem; display: grid; place-items: center; }
.steps-list > li::after { content: ""; position: absolute; inset-inline-start: 14px; top: 34px; bottom: 6px; width: 2px; background: var(--blue-soft); }
.steps-list > li:last-child::after { display: none; }
.steps-list p { margin: 3px 0 0; }
.shot { margin: var(--s3) 0 0; }
.shot img { display: block; width: 100%; max-width: min(100%, 390px); height: auto; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); background: var(--surface); }
.problems { margin: 0; display: grid; gap: 10px; }
.problems > div { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); background: var(--surface); }
.problems dt { font-weight: 650; }
.problems dd { margin: 4px 0 0; color: var(--muted); }
.related { padding-inline-start: 18px; margin-block: 0; }
.related li { margin: 0; font-size: .875rem; }
.related a { display: inline-block; padding-block: 5px; font-size: .875rem; }
.crumbs a { display: inline-block; padding-block: 4px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s7); }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; color: var(--fg); font-weight: 600; }
.pager a span { font-size: var(--t-xs); color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.pager a:hover { border-color: var(--blue); }
.pager .next { text-align: end; }
@media (max-width: 520px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: start; } }
