/* Guide pages (/guias/...), from the design export "Mods controlando o overlay". Tokens, top bar and footer come from
   topbar.css; labels, buttons, the selection frame, the overlay preview, the section heads and the closing block come
   from home.css. What is here is what only the guides have. */

/* ---------------------------------------------------------------- hero */
.g-hero { border-bottom: 1px solid var(--line); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 28px 28px; background-position: center top; }
.g-hero-in { padding: 64px 24px 88px; display: flex; flex-direction: column; gap: 28px; }
.g-hero h1 { max-width: 23ch; font-size: clamp(42px, 5.6vw, 80px); line-height: 1.04; }
.g-hero h1 .sel { white-space: nowrap; }

/* Marker pen over a few words of a title (design export "Destaque: marca-texto"): two strokes behind the words, the
   second a little later. They are drawn once when the page opens and stay: only loading the page again draws them again. */
.g-hero h1.marked { margin-bottom: 14px; }
.mark { position: relative; display: inline-block; white-space: nowrap; }
.mark > svg { position: absolute; left: -0.14em; top: 0.1em; width: calc(100% + 0.28em); height: calc(100% - 0.06em); overflow: visible; transform: skewX(-10deg) rotate(-1deg); color: var(--accent); pointer-events: none; }
.mark > span { position: relative; }
.mark .m1, .mark .m2 { stroke-dasharray: 620; }
.mark .m1 { stroke-opacity: 0.78; stroke-width: 64; animation: mark-draw .54s ease-out .3s both; }
.mark .m2 { stroke-opacity: 0.55; stroke-width: 40; animation: mark-draw .48s ease-out .78s both; }
@keyframes mark-draw { from { stroke-dashoffset: 622 } to { stroke-dashoffset: 0 } }
/* the way in, said quietly under the opening paragraph: two text links and the small print */
.g-ways { display: flex; flex-direction: column; gap: 10px; }
.g-soft { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 15px; font-weight: 500; }
.g-soft a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 4px; }
.g-soft a:hover { color: var(--text); text-decoration-color: var(--muted); }
.g-soft svg { flex: none; width: 16px; height: 16px; }
.g-fine { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--dim); }

/* ---------------------------------------------------------------- grids of cards separated by hairlines */
.g-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.g-grid > article { min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.g-grid h3 { letter-spacing: -0.02em; }
.g-grid p { margin: 0; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* the steps, each with a small picture of the control it talks about */
.g-steps { container: steps / inline-size; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
/* The columns are 300px at least with 1px between them, so there are two of them from 601px up to 901px. An odd
   number of cards would leave the last cell empty there, showing the colour of the hairlines: the last card takes both. */
@container steps (601px <= width < 902px) { .g-steps > article:last-child:nth-child(odd) { grid-column: span 2; } }
.g-steps > article { gap: 14px; padding: 28px 28px 30px; }
.g-steps .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--dim); }
.g-steps h3 { font-size: 24px; line-height: 1.15; }
.g-steps p { font-size: 15px; }
.g-demo { margin-top: auto; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.g-demo-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.4; }
.g-demo-check i { flex: none; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); }
.g-demo-check i svg { width: 12px; height: 12px; }
.g-demo-check + .g-demo-check { margin-top: 10px; }
.g-demo-chips { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.g-demo-chips span { padding: 5px 9px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--muted); white-space: nowrap; }
.g-demo-chips span.on { border-color: var(--accent); color: var(--text); }
.g-demo-role { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px 14px; background: var(--bg); border: 1px solid var(--accent); border-radius: 10px; }
.g-demo-role > span { display: flex; flex-direction: column; line-height: 1.3; }
.g-demo-role b { font-size: 14px; font-weight: 600; }
.g-demo-role small { font-size: 12.5px; color: var(--muted); }
.g-demo-role svg { flex: none; width: 18px; height: 18px; }

/* what a moderator can be allowed to do */
.g-perms { container: perms / inline-size; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.g-perms > article { gap: 12px; padding: 26px 26px 28px; }
.g-perms .feat-ico { color: var(--accent); }
.g-perms h3 { margin-top: 4px; font-size: 21px; line-height: 1.15; }
.g-perms p { font-size: 14.5px; }
.g-own-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-perms .g-own p { max-width: 46ch; }
/* Eight cards in three columns leave the last cell empty, and the empty cell shows the colour of the hairlines. The
   columns are 250px at least with 1px between them, so three of them fit from 752px up to 1002px: there the last card
   takes the two cells that are left. */
@container perms (752px <= width < 1003px) { .g-perms > article.g-own { grid-column: span 2; } }
.g-tag { align-self: flex-start; padding: 5px 10px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; }

/* questions and answers */
.g-faq { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.g-faq > article { gap: 10px; padding: 26px 28px 28px; }
.g-faq h3 { font-size: 20px; line-height: 1.2; text-wrap: balance; }
.g-faq p { font-size: 15px; }

/* ---------------------------------------------------------------- the list of guides (/guias): each card is one link */
.g-lead { max-width: 34em; }
.g-list { grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); }
.g-list > * { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 28px 28px 30px; background: var(--bg); }
.g-list > a { color: var(--text); text-decoration: none; transition: background .15s ease; }
.g-list > a:hover { color: var(--text); background: var(--panel); }
.g-list > a:focus-visible { outline-offset: -3px; }
.g-list-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.g-list .feat-ico { color: var(--accent); }
.g-list .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.g-list h3 { font-size: 24px; line-height: 1.15; text-wrap: balance; }
.g-list p { font-size: 15px; }
.g-list > article.g-own { justify-content: center; background: var(--panel); }
/* The list has two columns at most. After an even number of guides the "coming soon" card would sit alone beside an
   empty cell, so it takes the whole row; after an odd number it fills the cell that is left. */
.g-list > a:nth-of-type(even) + article.g-own { grid-column: 1 / -1; }
.g-more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-soft); }
.g-more svg { flex: none; width: 16px; height: 16px; transition: transform .15s ease; }
.g-list > a:hover .g-more svg { transform: translateX(3px); }

/* ---------------------------------------------------------------- "you stay in control": a point and its explanation, side by side */
.g-safe { flex: 1.4 1 460px; min-width: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.g-safe li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.g-safe .what { flex: 1 1 260px; display: flex; align-items: flex-start; gap: 14px; font-size: 18px; font-weight: 500; line-height: 1.35; }
.g-safe .what svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }
.g-safe .why { flex: 1.3 1 320px; padding-top: 2px; font-size: 15px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
