/*
 * The guides (/guides, /pt/guias, /es/guias), on top of site.css: its
 * tokens, header, footer and .prose. Written pages come from
 * tools/make-guides.py.
 */

.top .lang { margin-left: auto; }
.top__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top__links + .lang { margin-left: 0; }
.top__links a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.top__links a:hover { color: var(--ink); background: var(--wash); }
.top__links a[aria-current="page"] { color: var(--ink); }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; min-width: 40px; padding: 0 8px; border-radius: 999px; font-weight: 700; font-size: .85rem; color: inherit; text-decoration: none; }
.lang a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 1023px), (pointer: coarse) { .lang a { min-height: 36px; } }
@media (max-width: 420px) { .top__links a { padding: 8px 8px; } }
/* at 320-379px the name beside the mark would push EN PT ES off the screen;
   the mark stays, and the link keeps its aria-label */
@media (max-width: 379px) { .top .brand span { display: none; } }

.guide { padding: clamp(28px, 5vw, 56px) 0 8px; }
.guide__wrap { max-width: 760px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 18px; font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
@media (max-width: 1023px), (pointer: coarse) { .crumbs a { display: inline-block; padding-block: 8px; margin-block: -8px; } }
.guide h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.03em; }
.guide .lede { max-width: none; margin-bottom: 14px; }
.guide__meta { margin: 0 0 8px; font-size: 14px; color: var(--ink-3); }

.guide__body { max-width: none; margin-top: 12px; }
.guide__body h2 { font-size: clamp(22px, 2.8vw, 28px); margin: 40px 0 12px; line-height: 1.2; }
.guide__body p, .guide__body li { font-size: 17px; line-height: 1.65; }
.guide__body li { margin-bottom: 10px; }
.guide__body code { overflow-wrap: anywhere; }
.guide__body em { font-style: normal; font-weight: 700; color: var(--ink); }

/* numbered steps: a bronze disc with the number, the text beside it */
ol.steps { list-style: none; padding: 0; margin: 0 0 1.2em; counter-reset: step; }
ol.steps li { counter-increment: step; position: relative; padding-left: 46px; margin-bottom: 14px; min-height: 32px; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; line-height: 1;
}

.guide__cta { margin: 40px 0; padding: clamp(22px, 4vw, 36px); border-radius: 24px; background: var(--card-face, #1c222b); color: #e6ebf2; display: grid; gap: 12px; }
.guide__cta h2 { margin: 0; color: #fff; font-size: clamp(22px, 2.8vw, 30px); }
.guide__cta p { margin: 0; color: #c3cad6; max-width: 40em; }
.guide__cta .cta { margin: 6px 0 0; }

.faq { margin: 8px 0 0; }
.faq h2 { font-size: clamp(22px, 2.8vw, 30px); margin: 0 0 8px; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 32px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 1.35rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }

.guide__risk { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--ink-3); }

.guide-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.guide-card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  transition: transform .2s ease, border-color .2s ease;
}
.guide-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.guide-card small { color: var(--accent); font-weight: 750; font-size: 13px; }
.guide-card h3 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }
.guide-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.guide-card span { margin-top: auto; color: var(--accent); font-weight: 700; font-size: 15px; }
.guide-more { margin-top: 20px; }
.guide-more a { color: var(--accent); font-weight: 700; }
@media (max-width: 1023px), (pointer: coarse) { .guide-more a { display: inline-block; padding-block: 9px; } }
@media (prefers-reduced-motion: reduce) { .guide-card, .guide-card:hover { transition: none; transform: none; } }
