.detail-top{background:var(--card);border-bottom:1px solid var(--line)}
.detail-top .inner{padding-block:30px 0}
.dt-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.detail-top h1{font-size:clamp(30px,4.6vw,52px);letter-spacing:-.015em;line-height:1.05;max-width:22ch}
.dt-sum{font-size:clamp(17px,2vw,20px);color:var(--ink-2);max-width:62ch;margin-top:16px;line-height:1.5}
.dt-bar{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:22px 0;margin-top:24px;border-top:1px solid var(--line)}
.dt-bar .item{display:flex;align-items:center;gap:9px;font-family:var(--mono);font-size:12.5px;color:var(--muted)}
.dt-bar .item svg{width:15px;height:15px;color:var(--ink-2)}
.dt-bar .item b{color:var(--ink);font-weight:600}
.dt-bar .spacer{flex:1}
.share{display:flex;gap:8px}
.share button{width:38px;height:38px;border-radius:9px;border:1px solid var(--line-2);background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--ink-2);transition:all .2s}
.share button:hover{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.share button svg{width:16px;height:16px}

.dt-photo{position:relative;aspect-ratio:21/8;min-height:240px;background:var(--night-2)}
.dt-photo .ph{position:absolute;inset:0;height:auto;background:#13110b;background-image:repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 13px)}

/* layout */
.detail-grid{display:grid;grid-template-columns:1fr 340px;gap:54px;align-items:start}
.prose{max-width:68ch}
.prose h2{font-size:26px;letter-spacing:-.02em;margin:40px 0 14px}
.prose h2:first-child{margin-top:0}
.prose p{margin:0 0 16px;color:var(--ink-2);line-height:1.7}
.prose strong{color:var(--ink)}
.prose a{color:var(--brand,#03579F);text-decoration:underline;text-underline-offset:2px}
.prose ul,.prose ol{margin:0 0 18px;padding-left:22px;color:var(--ink-2);line-height:1.7}
.prose li{margin-bottom:6px}
.prose blockquote{margin:22px 0;padding:12px 20px;border-left:3px solid var(--yellow-deep,#E6B800);background:var(--yellow-soft,#fff8e1);border-radius:0 10px 10px 0;color:var(--ink-2)}
.prose h3{font-size:21px;margin:30px 0 12px;letter-spacing:-.01em}
.prose h4{font-size:18px;margin:24px 0 10px}
.prose hr{border:0;border-top:1px solid var(--line);margin:32px 0}
/* images & captions */
.post-img{margin:26px 0;text-align:center}
.post-img img{max-width:100%;height:auto;border-radius:14px;display:block;margin:0 auto}
.post-img figcaption,.post-cap{margin-top:8px;font-size:13px;color:var(--muted);font-style:italic}
.post-gif img{max-width:100%;border-radius:14px}
/* galleries */
.post-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;margin:26px 0}
.post-gallery img{width:100%;height:100%;object-fit:cover;border-radius:12px;aspect-ratio:4/3}
/* embeds (iframes, maps, video) */
.post-embed{margin:26px 0;border-radius:14px;overflow:hidden;background:#0e1217}
.post-embed iframe,.post-embed video{display:block;width:100%;border:0;min-height:var(--embed-h,460px)}
.post-embed--video iframe,.post-embed--video video{aspect-ratio:16/9;min-height:0}
.post-embed--left{margin-right:auto}.post-embed--right{margin-left:auto}
/* file downloads */
.post-file{display:flex;align-items:center;gap:14px;margin:18px 0;padding:14px 18px;border:1px solid var(--line);border-radius:14px;background:var(--card);text-decoration:none;color:var(--ink);transition:border-color .15s,box-shadow .15s}
.post-file:hover{border-color:var(--yellow-deep,#E6B800);box-shadow:0 6px 16px rgba(0,0,0,.06)}
.post-file .pf-ic{flex:none;display:grid;place-items:center;min-width:46px;height:34px;padding:0 8px;border-radius:8px;background:#E30413;color:#fff;font-family:var(--mono,monospace);font-size:11px;font-weight:700;letter-spacing:.04em}
.post-file .pf-meta{display:flex;flex-direction:column;min-width:0}
.post-file .pf-name{font-weight:600;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-file .pf-sz{font-size:12px;color:var(--muted)}
.post-file .pf-dl{width:20px;height:20px;margin-left:auto;color:var(--muted);flex:none}
/* accordions */
.post-accordion{margin:24px 0;display:flex;flex-direction:column;gap:10px}
.acc-item{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card)}
.acc-item>summary{cursor:pointer;list-style:none;padding:14px 18px;font-weight:600;font-size:15px;display:flex;align-items:center;gap:10px}
.acc-item>summary::-webkit-details-marker{display:none}
.acc-item>summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin-left:auto;transition:transform .2s}
.acc-item[open]>summary::after{transform:rotate(-135deg)}
.acc-item .acc-body{padding:2px 18px 16px;color:var(--ink-2);line-height:1.7;font-size:14.5px}
.acc-item .acc-body p{margin:0 0 8px}
/* tables */
.post-table-wrap{margin:26px 0;overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.post-table{border-collapse:collapse;width:100%;font-size:14px}
.post-table th,.post-table td{padding:10px 14px;border:1px solid var(--line);text-align:left;vertical-align:top;color:var(--ink-2)}
.post-table th{font-weight:700;color:var(--ink);background:var(--yellow-soft,#fff8e1)}
.post-table p{margin:0}
.callout{display:flex;gap:14px;background:var(--warn-bg);border:1px solid #ecd6b3;border-radius:14px;padding:18px 20px;margin:24px 0}
.callout svg{width:22px;height:22px;color:var(--warn);flex:none;margin-top:1px}
.callout p{margin:0;color:#6e4a14;font-size:15px}
.callout b{color:#5a3c10}

/* route compare */
.route-compare{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}
.rc-col{border:1px solid var(--line);border-radius:14px;overflow:hidden}
.rc-col .rc-head{padding:13px 16px;font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;display:flex;align-items:center;gap:9px;font-weight:600}
.rc-col.normal .rc-head{background:var(--yellow-soft);color:#6e5d0a}
.rc-col.normal .rc-head .d{width:18px;height:4px;border-radius:2px;background:var(--yellow-deep)}
.rc-col.temp .rc-head{background:var(--warn-bg);color:#6e4a14}
.rc-col.temp .rc-head .d{width:18px;height:4px;border-radius:2px;background:var(--warn);background-image:repeating-linear-gradient(90deg,var(--warn) 0 4px,transparent 4px 8px)}
.rc-col ol{margin:0;padding:14px 16px 16px 34px;color:var(--ink-2);font-size:14.5px;line-height:1.7}
.rc-col ol li{margin-bottom:5px}
@media (max-width:560px){.route-compare{grid-template-columns:1fr}}

/* stops list */
.stops{display:flex;flex-direction:column;gap:8px;margin:20px 0}
.stop-item{display:flex;align-items:center;gap:12px;padding:13px 16px;border:1px solid var(--line);border-radius:11px;background:var(--card)}
.stop-item .ic{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;flex:none}
.stop-item.sup .ic{background:var(--urgent-bg);color:var(--urgent)}
.stop-item.tmp .ic{background:var(--ok-bg);color:var(--ok)}
.stop-item .ic svg{width:15px;height:15px}
.stop-item .nm{font-weight:600;font-size:15px}
.stop-item .tag{margin-left:auto;font-family:var(--mono);font-size:11px;letter-spacing:.05em;text-transform:uppercase}
.stop-item.sup .tag{color:var(--urgent)}
.stop-item.tmp .tag{color:var(--ok)}

/* sidebar */
.aside{position:sticky;top:96px;display:flex;flex-direction:column;gap:16px}
.panel{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px}
.panel h4{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:16px}
.kv{display:flex;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--line);font-size:14.5px}
.kv:last-child{border-bottom:0;padding-bottom:0}
.kv .k{color:var(--muted)}
.kv .v{font-weight:600;text-align:right}
.panel.sub{background:var(--ink);color:var(--on-night)}
.panel.sub h4{color:var(--on-night-muted)}
.panel.sub p{color:var(--on-night-muted);font-size:14px;margin:0 0 16px;line-height:1.5}
.doc-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.doc-row:last-child{border-bottom:0;padding-bottom:0}
.doc-row .di{width:38px;height:38px;border-radius:9px;background:var(--paper-2);display:grid;place-items:center;color:var(--ink);flex:none}
.doc-row .di svg{width:18px;height:18px}
.doc-row .dn{font-weight:600;font-size:14px;line-height:1.3}
.doc-row .dm{font-family:var(--mono);font-size:11px;color:var(--muted)}
.doc-row .dl{margin-left:auto;color:var(--muted)}
.report{display:flex;gap:11px;align-items:flex-start;font-size:13.5px;color:var(--muted);padding:16px;border:1px dashed var(--line-2);border-radius:12px}
.report svg{width:18px;height:18px;flex:none;margin-top:1px;color:var(--ink-2)}
.report a{color:var(--ink);font-weight:600;text-decoration:underline;text-underline-offset:2px}

/* timeline */
.timeline{position:relative;padding-left:28px;margin-top:8px}
.timeline::before{content:"";position:absolute;left:7px;top:6px;bottom:6px;width:2px;background:var(--line-2)}
.tl-item{position:relative;padding-bottom:22px}
.tl-item::before{content:"";position:absolute;left:-25px;top:4px;width:12px;height:12px;border-radius:50%;background:var(--card);border:2.5px solid var(--line-2)}
.tl-item.on::before{border-color:var(--warn);background:var(--warn)}
.tl-item .d{font-family:var(--mono);font-size:12px;color:var(--muted)}
.tl-item .t{font-weight:600;margin-top:3px}
.tl-item p{margin:4px 0 0;font-size:14px;color:var(--ink-2)}

@media (max-width:880px){.detail-grid{grid-template-columns:1fr;gap:34px}.aside{position:static}}

/* related */
.rel-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
@media (max-width:760px){.rel-grid{grid-template-columns:1fr}}
.rel-card{display:flex;flex-direction:column;gap:10px;padding:18px;cursor:pointer}
.rel-card .rt{display:flex;gap:6px}
.rel-card h4{font-size:17px;letter-spacing:-.01em;line-height:1.25}
.rel-card .m{font-family:var(--mono);font-size:11.5px;color:var(--muted)}
/* ============ comments ============ */
.comments-sec{max-width:760px;margin:0 auto}
.comments-title{font-size:22px;letter-spacing:-.02em;margin:0 0 22px}
.cmt-form{margin:0 0 26px}
.cmt-form textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:13px 15px;font:inherit;font-size:15px;line-height:1.6;color:var(--ink);background:var(--card);resize:vertical;min-height:54px}
.cmt-form textarea:focus{outline:none;border-color:var(--yellow-deep,#E6B800);box-shadow:0 0 0 3px var(--yellow-soft,#fff8e1)}
.cmt-form-actions{display:flex;justify-content:flex-end;margin-top:10px}
.btn-sm{padding:7px 14px;font-size:13px}
.cmt-login{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px 20px;margin:0 0 26px}
.cmt-login p{margin:0;color:var(--ink-2)}
.cmt-empty{color:var(--muted);padding:8px 0 4px}
.cmt-list,.cmt-replies{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:22px}
.cmt-replies{margin-top:18px;padding-left:18px;border-left:2px solid var(--line);gap:18px}
.cmt{display:flex;gap:13px}
.cmt-av{flex:none;width:40px;height:40px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:var(--azul-escuro,#03579F);color:#fff;font-weight:700;font-size:14px;text-decoration:none}
.cmt-av img{width:100%;height:100%;object-fit:cover}
.cmt-main{flex:1;min-width:0}
.cmt-head{display:flex;align-items:baseline;gap:10px;margin-bottom:3px}
.cmt-name{font-weight:700;font-size:14.5px;color:var(--ink);text-decoration:none}
.cmt-name:hover{text-decoration:underline}
.cmt-time{font-size:12.5px;color:var(--muted)}
.cmt-body{color:var(--ink-2);line-height:1.65;font-size:14.5px}
.cmt-body p{margin:0 0 8px}
.cmt-body p:last-child{margin-bottom:0}
.cmt-tools{display:flex;align-items:center;gap:14px;margin-top:7px}
.cmt-link{background:none;border:0;padding:0;cursor:pointer;font:inherit;font-size:13px;font-weight:600;color:var(--muted)}
.cmt-link:hover{color:var(--ink)}
.cmt-link.danger:hover{color:#E30413}
.cmt-del{display:inline}
.cmt-reply-form{margin-top:12px}
/* ===== Comentários — estados otimistas (AJAX) ===== */
.cmt-list[data-empty="1"]{display:none}
.cmt-new{animation:cmtIn .28s ease}
@keyframes cmtIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.cmt-removing{opacity:.5;transition:opacity .15s}
.cmt-collapse{opacity:0;height:0!important;overflow:hidden;margin:0;transform:translateY(-4px);transition:opacity .22s ease,height .22s ease,margin .22s ease,transform .22s ease}
.btn.is-loading{position:relative;color:transparent!important;pointer-events:none}
.btn.is-loading::after{content:"";position:absolute;top:50%;left:50%;width:15px;height:15px;margin:-8px 0 0 -8px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;color:#fff;animation:cmtSpin .6s linear infinite}
@keyframes cmtSpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.cmt-new{animation:none}.cmt-collapse{transition:none}.btn.is-loading::after{animation:none}}.cmt-err{margin:10px 0 0;font-size:13px;font-weight:600;color:#E30413}