/* pages.css — páginas de conteúdo: protocolos, guias, exames, verificar, estudos */
.page-hero { padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 88px)); padding-bottom: clamp(28px, 4vw, 48px); }
.page-hero .h1 { margin-top: 14px; max-width: 18ch; }
.page-hero .lead { margin-top: 16px; }

/* Protocolos */
.stack-filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 24px; }
.stack-filter::-webkit-scrollbar { display: none; }
.stack-filter .pill { flex-shrink: 0; }
.stack-list { display: flex; flex-direction: column; gap: 16px; }
.stack-card { --c: var(--cyan); display: grid; grid-template-columns: 1fr 1.15fr; border-radius: 26px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; transition: border-color 0.3s; }
.stack-card:hover { border-color: var(--line-2); }
.stack-card .sc-info { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); background: radial-gradient(500px 280px at 0% 0%, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%); }
.stack-card .sc-num { font-family: var(--font-mono); font-size: 12px; color: var(--c); letter-spacing: 0.12em; }
.stack-card h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.025em; line-height: 1.1; }
.stack-card .goal { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.stack-card .why { color: var(--ink-2); font-size: 15px; }
.stack-card .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.stack-card .meta .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.stack-card .meta .v { font-size: 14px; font-weight: 600; margin-top: 3px; }
.stack-card .sc-comp { padding: clamp(18px, 2.4vw, 26px); display: flex; flex-direction: column; gap: 10px; }
.comp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.2s, transform 0.3s var(--ease); }
.comp:hover { border-color: var(--line-2); transform: translateX(3px); }
.comp .nm { font-weight: 800; font-size: 15.5px; }
.comp .nm a:hover { color: var(--cyan); }
.comp .role { font-size: 13px; color: var(--ink-3); grid-column: 1; }
.comp .ds { font-family: var(--font-mono); font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }
.comp .fq { font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.comp .calc { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.comp .calc a { font-size: 12.5px; font-weight: 700; color: var(--cyan); }
.comp .when { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-2); }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; }
.day-strip span { text-align: center; font-family: var(--font-mono); font-size: 10px; padding: 6px 0; border-radius: 6px; background: var(--surface); color: var(--ink-3); border: 1px solid var(--line); }
.day-strip span.on { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--ink); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.stack-labs { display: flex; flex-wrap: wrap; gap: 6px; }

/* Guias */
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 24px; border: 1px solid var(--line); background: var(--bg-2); transition: all 0.35s var(--ease); min-height: 220px; }
.guide-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.guide-card .n { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); }
.guide-card h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.guide-card p { color: var(--ink-2); font-size: 15px; }
.guide-card .go { margin-top: auto; font-weight: 700; color: var(--cyan); font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
.guide-card .go svg { width: 18px; }
.article { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 40px; }
.article .toc { position: sticky; top: calc(var(--nav-h) + 36px); display: flex; flex-direction: column; gap: 2px; }
.article .toc a { padding: 7px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-left: 2px solid transparent; }
.article .toc a:hover, .article .toc a.on { color: var(--ink); border-left-color: var(--cyan); }
.article section { padding-bottom: 44px; }
.article section > h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.025em; margin-bottom: 16px; }
.steps-list { counter-reset: st; display: flex; flex-direction: column; gap: 10px; list-style: none; }
.steps-list li { counter-increment: st; position: relative; padding: 16px 18px 16px 60px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 15px; }
.steps-list li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 18px; top: 15px; font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--cyan); }
.steps-list li strong { color: var(--ink); display: block; margin-bottom: 2px; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.check-list li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15px; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint); transform: rotate(-45deg); }
.x-list li::before { width: 12px; height: 12px; border: 0; top: 5px; transform: none; background: linear-gradient(45deg, transparent 44%, var(--red) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--red) 44% 56%, transparent 56%); }
.body-map { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--bg-2); }
.body-map svg { width: 100%; height: auto; }
.body-map .spot { animation: spotPulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spotPulse { 50% { transform: scale(1.35); opacity: 0.55; } }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compare > div { padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.compare h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.compare dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.compare dt { color: var(--ink-3); }
.compare dd { color: var(--ink); font-weight: 600; }
.temp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.temp { padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.temp .t { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.temp .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.temp p { font-size: 14px; color: var(--ink-2); margin-top: 6px; }

/* Exames */
.lab-group { border-radius: 24px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.lab-group + .lab-group { margin-top: 14px; }
.lab-group > summary { list-style: none; cursor: pointer; padding: 22px 24px; display: flex; align-items: center; gap: 16px; }
.lab-group > summary::-webkit-details-marker { display: none; }
.lab-group > summary h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.lab-group > summary p { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.lab-group > summary .plus { margin-left: auto; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; flex-shrink: 0; transition: transform 0.3s var(--ease); color: var(--cyan); font-family: var(--font-mono); }
.lab-group[open] > summary .plus { transform: rotate(45deg); }
.lab-body { padding: 0 24px 24px; }
.lab-body .peps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lab-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.lab-row b { font-weight: 800; }
.lab-row span { color: var(--ink-2); }
.timeline-mini { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.timeline-mini span { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }

/* Verificar */
.verify-shell { max-width: 640px; margin: 0 auto; }
.verify-card { padding: clamp(20px, 4vw, 32px); border-radius: 28px; border: 1px solid var(--line-2); background: var(--bg-2); display: flex; flex-direction: column; gap: 16px; }
.scan-frame { position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #000; display: none; }
.scan-frame.on { display: block; }
.scan-frame video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame .reticle { position: absolute; inset: 16%; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.45); }
.scan-frame .reticle::before, .scan-frame .reticle::after { content: ''; position: absolute; inset: 0; border-radius: 18px; border: 2px solid var(--cyan); clip-path: polygon(0 0, 22% 0, 22% 3px, 3px 3px, 3px 22%, 0 22%, 0 78%, 3px 78%, 3px calc(100% - 3px), 22% calc(100% - 3px), 22% 100%, 78% 100%, 78% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 78%, 100% 78%, 100% 22%, calc(100% - 3px) 22%, calc(100% - 3px) 3px, 78% 3px, 78% 0); }
.scan-frame .reticle::after { border: 0; clip-path: none; height: 2px; top: 50%; bottom: auto; background: var(--cyan); box-shadow: 0 0 18px 3px var(--cyan-glow); animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 6%; } 50% { top: 94%; } }
.scan-frame .close { position: absolute; top: 12px; right: 12px; }
.upload { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 16px; border: 1px dashed var(--line-3); color: var(--ink-2); font-weight: 700; font-size: 14.5px; cursor: pointer; transition: all 0.2s; }
.upload:hover { color: var(--ink); border-color: var(--cyan); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.manual { display: flex; gap: 8px; }
.manual .input { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.result-panel { display: none; padding: 22px; border-radius: 20px; border: 1px solid var(--line-2); text-align: center; animation: pop 0.45s var(--ease-spring); }
.result-panel.show { display: block; }
@keyframes pop { from { opacity: 0; transform: scale(0.94); } }
.result-panel .ri { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; }
.result-panel .ri svg { width: 32px; height: 32px; }
.result-panel .rt { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.result-panel .rd { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.result-panel.ok { border-color: rgba(61, 255, 181, 0.4); background: rgba(61, 255, 181, 0.06); }
.result-panel.ok .ri { background: rgba(61, 255, 181, 0.14); color: var(--mint); }
.result-panel.ok .ri svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.6s 0.15s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.result-panel.fail { border-color: rgba(255, 93, 115, 0.4); background: rgba(255, 93, 115, 0.06); }
.result-panel.fail .ri { background: rgba(255, 93, 115, 0.14); color: var(--red); }
.result-panel.wait .ri { background: var(--surface-2); color: var(--cyan); }
.result-panel.wait .ri svg { animation: spin2 1s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }

/* Estudos */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; padding: 20px 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); transition: border-color 0.2s; }
.feed-item:hover { border-color: var(--line-2); }
.feed-item .side { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.feed-item .pep { font-weight: 800; font-size: 14px; color: var(--cyan); }
.feed-item h2 { font-size: 16.5px; font-weight: 700; line-height: 1.4; }
.feed-item h2 a:hover { color: var(--cyan); }
.feed-item .m { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.skeleton { height: 96px; border-radius: 20px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 900px) {
  .stack-card { grid-template-columns: minmax(0, 1fr); }
  .stack-card .sc-info { border-right: 0; border-bottom: 1px solid var(--line); }
  .article { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article > * { min-width: 0; }
  .article .toc { position: static; flex-direction: row; overflow-x: auto; margin-bottom: 24px; scrollbar-width: none; }
  .article .toc a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .article .toc a.on { border-bottom-color: var(--cyan); }
}
@media (max-width: 640px) {
  .guide-grid, .compare, .temp-grid { grid-template-columns: 1fr; }
  .body-map { grid-template-columns: 1fr; }
  .body-map svg { max-width: 200px; margin: 0 auto; }
  .lab-row { grid-template-columns: 1fr; gap: 4px; }
  .feed-item { grid-template-columns: 1fr; gap: 10px; }
  .feed-item .side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .lab-group > summary { padding: 18px; }
  .lab-body { padding: 0 18px 18px; }
  .comp { grid-template-columns: 1fr; }
  .comp .ds, .comp .fq { text-align: left; }
  .stack-card .meta { grid-template-columns: 1fr; }
  .manual { flex-direction: column; }
}
