/* Página de cada ferramenta (app/<id>/). Usa as variáveis e o topo de paginas.css. */
.app-page { background: var(--paper); }
.app-page .page-top { padding-bottom: clamp(36px, 6vw, 72px); }
.back { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.back:hover { color: var(--mint); }

/* topo: texto à esquerda, imagem do app à direita */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-top: clamp(16px, 4vw, 40px); }
.id { display: flex; align-items: center; gap: 12px; }
.logo { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: #fff; flex: 0 0 auto; }
.logo-txt { display: inline-flex; align-items: center; justify-content: center; background: var(--teal); color: #062020; font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.hero h1 { margin-top: 18px; font-size: clamp(40px, 6vw, 68px); line-height: 1; font-weight: 800; }
.hero .home-lead { font-size: clamp(18px, 2vw, 21px); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; border-radius: 8px; background: rgba(94,234,212,.14); color: #D8E6E6; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.page-top .home-button.ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.page-top .home-button.ghost:hover { background: #fff; color: var(--ink); }
.page-top .home-button.inst { background: var(--mint); border-color: var(--mint); color: #062020; }
.page-top .home-button.inst:hover { background: #fff; border-color: #fff; }
.hero-shot { border-radius: 16px; overflow: hidden; background: #0F1D1D; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 7px rgba(94,234,212,.08); }
.shot { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; background: #fff; }

/* capa gerada quando o repositório não tem imagem */
.cover-gen { display: flex; align-items: flex-end; aspect-ratio: 16 / 9; padding: 7%; background:
  radial-gradient(120% 90% at 100% 0%, rgba(94,234,212,.55), rgba(94,234,212,0) 60%),
  radial-gradient(90% 90% at 0% 100%, rgba(14,116,144,.7), rgba(14,116,144,0) 70%), #0B2424; }
.cover-gen b { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 4vw, 44px); line-height: 1; letter-spacing: -0.02em; color: #fff; }

/* corpo: texto + coluna lateral */
.body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 5vw, 72px); padding-top: clamp(36px, 5vw, 56px); padding-bottom: 48px; }
.content { max-width: 760px; }
.sec + .sec { margin-top: clamp(36px, 5vw, 52px); }
.sec h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.1; font-weight: 800; margin-bottom: 14px; scroll-margin-top: 20px; }
.sec p + p { margin-top: 12px; }
.sec > p { max-width: 68ch; }
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.feats li { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.feats h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 18px; line-height: 1.2; }
.feats p { font-size: 15.5px; color: var(--muted); }
.gal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.gal a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.gal img { display: block; width: 100%; height: 100%; max-height: 320px; object-fit: cover; object-position: top; transition: transform .3s ease; }
@media (prefers-reduced-motion: no-preference) { .gal a:hover img { transform: scale(1.03); } }
.uses { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.uses li { position: relative; padding: 12px 16px 12px 44px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.uses li::before { content: '→'; position: absolute; left: 16px; top: 12px; color: var(--deep); font-weight: 700; }
.req { padding: 16px 18px; border-radius: 12px; background: #E4ECE8; margin-bottom: 18px; }
.req h3 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.req ul { margin: 0; padding-left: 20px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 16px; }
.steps > li { counter-increment: s; position: relative; padding-left: 46px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--mint); font-family: var(--font-mono); font-size: 14px; }
.code { position: relative; margin-top: 10px; }
.code pre { margin: 0; padding: 14px 92px 14px 16px; overflow-x: auto; border-radius: 10px; background: var(--ink); color: #DDF3EE; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6; }
.code code { padding: 0; background: none; font-size: inherit; white-space: pre; }
.copy { position: absolute; top: 8px; right: 8px; min-height: 32px; padding: 0 12px; border: 1px solid rgba(94,234,212,.5); border-radius: 8px; background: transparent; color: var(--mint); font-size: 13px; cursor: pointer; }
.copy:hover { background: rgba(94,234,212,.12); }
.note { margin-top: 16px; font-size: 15px; color: var(--muted); }
.note a, .facts a, .src a { color: var(--deep); font-weight: 600; text-underline-offset: 3px; }
.warn { margin: 0; padding: 16px 18px 16px 38px; border-radius: 12px; background: #FFF6DE; border: 1px solid #EBD69A; }
.warn li + li { margin-top: 6px; }
.src { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

.side { position: relative; }
.side > * + * { margin-top: 20px; }
.facts { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.facts dl { margin: 0; display: grid; gap: 14px; }
.facts dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.stars { display: inline-flex; align-items: center; gap: 6px; }
.stars svg { color: #D49A00; }
.toc { position: sticky; top: 20px; padding: 4px 0 0 20px; border-left: 2px solid var(--line); }
.toc p { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc ul { margin: 8px 0 0; padding: 0; list-style: none; }
.toc a { display: flex; align-items: center; min-height: 34px; color: var(--text); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--deep); text-decoration: underline; text-underline-offset: 3px; }

/* parecidos */
.more { padding-bottom: 64px; }
.more h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; margin-bottom: 18px; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.mini { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--text); text-decoration: none; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.mini:hover { border-color: #8FC4BC; box-shadow: 0 18px 32px -22px rgba(11,60,60,.45); }
@media (prefers-reduced-motion: no-preference) { .mini:hover { transform: translateY(-3px); } }
.mini-cover { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; object-position: top; background: #F1F0EA; border-bottom: 1px solid var(--line); }
.mini-cover.cover-gen { border-bottom: 0; }
.mini-cover.cover-gen b { font-size: 24px; }
.mini > span { display: grid; gap: 4px; padding: 14px 16px 16px; }
.mini b { font-family: var(--font-display); font-size: 19px; }
.mini small { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 900px) {
  .hero, .body { grid-template-columns: minmax(0, 1fr); }
  .side { order: -1; }
  .toc { display: none; }
}
.mini-cover.fit { object-fit: contain; padding: 5%; }
.shot.fit { padding: 4%; }
.sec code, .warn code, .uses code { overflow-wrap: anywhere; }
.mini { text-decoration: none; }
