/* App-specific styles layered on top of lean-blog.css */

.wrap.narrow { max-width: 760px; }
.hero.compact { padding: 32px 0 14px; }
.btn-primary {
  display: inline-block; background: var(--accent); color: #0b140f;
  font-weight: 650; padding: 10px 20px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 14px; text-decoration: none; letter-spacing: .2px;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  display: inline-block; background: transparent; color: var(--text-2);
  border: 1px solid var(--border-strong); padding: 9px 16px; border-radius: 8px;
  cursor: pointer; font-size: 13.5px; text-decoration: none;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }
.btn-ghost.danger { color: #e5676d; border-color: rgba(229,103,109,.4); }
.btn-ghost.danger:hover { background: rgba(229,103,109,.12); }

.write-form { display: flex; flex-direction: column; gap: 16px; margin: 18px 0 40px; }
.write-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.write-form .opt { color: var(--text-3); font-weight: 400; }
.write-form input[type=text], .write-form input[type=password], .write-form textarea {
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 11px 13px; font-size: 14px; font-family: inherit; width: 100%;
}
.write-form textarea { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; line-height: 1.6; resize: vertical; }
.write-form input:focus, .write-form textarea:focus { outline: none; border-color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-btn {
  display: inline-block !important; background: var(--surface-3); border: 1px solid var(--border-strong);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-2);
}
.file-btn:hover { color: var(--text); }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.preview-area {
  border: 1px dashed var(--border-strong); border-radius: 10px; padding: 18px 22px;
  background: var(--surface); margin-top: 6px;
}

/* User post body: scoped typography so community content looks native */
.post-body { color: var(--text); font-size: 16px; line-height: 1.75; }
.post-body h1 { font-size: 1.7rem; margin: 1.6rem 0 .6rem; color: var(--text); }
.post-body h2 { font-size: 1.38rem; margin: 1.5rem 0 .5rem; color: var(--text); border: none; padding: 0; }
.post-body h3 { font-size: 1.14rem; margin: 1.2rem 0 .4rem; color: var(--text); }
.post-body h4 { font-size: 1rem; margin: 1rem 0 .3rem; color: var(--text-2); }
.post-body p { margin: .85rem 0; }
.post-body a { color: var(--accent-text, var(--accent)); text-decoration: underline; text-underline-offset: 2px; }
.post-body ul, .post-body ol { padding-left: 1.4rem; margin: .8rem 0; }
.post-body li { margin: .3rem 0; }
.post-body blockquote {
  border-left: 3px solid var(--accent); margin: 1rem 0; padding: .3rem 0 .3rem 1rem;
  color: var(--text-2); background: var(--surface-3); border-radius: 0 8px 8px 0;
}
.post-body code { font-family: 'JetBrains Mono', monospace; font-size: .88em; background: var(--surface-3); padding: 2px 6px; border-radius: 4px; color: var(--accent-text, var(--accent)); }
.post-body pre { background: #0d1117; color: #c9d1d9; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 1rem 0; }
.post-body pre code { background: none; color: inherit; padding: 0; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); margin: 1rem 0; display: block; }
.post-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 14px; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 11px; text-align: left; }
.post-body th { background: var(--surface-3); }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 1.6rem 0; }


/* seed-cve */
.oob-anim .buf { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); stroke-width: 1.5; }
  .oob-anim .oobzone { fill: rgba(239,68,68,0.09); stroke: rgba(239,68,68,0.5); stroke-width: 1.5; stroke-dasharray: 5 4; }
  .oob-anim .guard { fill: rgba(239,68,68,0.26); stroke: var(--red); stroke-width: 1.5; }
  .oob-anim .readwin { fill: var(--amber); opacity: 0.95; animation: slideRead 7s cubic-bezier(.5,0,.5,1) infinite; }
  .oob-anim .ptrlabel { animation: slideRead 7s cubic-bezier(.5,0,.5,1) infinite; }
  .oob-anim .crash { opacity: 0; animation: crashFlash 7s linear infinite; }
  @keyframes slideRead { 0%,8%{transform:translateX(0)} 62%,100%{transform:translateX(560px)} }
  @keyframes crashFlash { 0%,60%{opacity:0} 66%{opacity:1} 80%{opacity:1} 92%,100%{opacity:0} }
  @media (prefers-reduced-motion: reduce){ .oob-anim .readwin,.oob-anim .ptrlabel{animation:none;transform:translateX(560px)} .oob-anim .crash{animation:none;opacity:1} }
  .flow-node{fill:var(--surface-2);stroke:var(--border-strong);stroke-width:1.2}
  .flow-node.root{stroke:var(--amber)} .flow-node.sink{stroke:var(--red);fill:rgba(239,68,68,0.07)}
  .flow-arrow{stroke:var(--text-3);stroke-width:1.4;fill:none;marker-end:url(#arrow)}
  .cg-row{fill:var(--surface-2);stroke:var(--border)} .cg-row.sink{fill:rgba(239,68,68,0.07);stroke:rgba(239,68,68,0.5)}
