*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{background:#eef2ff;color:#111827;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Inter",sans-serif;line-height:1.6;overflow:hidden}
a{color:#2563eb;text-decoration:none}
a:hover{text-decoration:underline}
.layout{max-width:1180px;margin:0 auto;padding:1.25rem 1rem 1.5rem;height:100vh;display:flex;flex-direction:column;overflow:hidden}
.site-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.25rem;padding:.6rem .9rem;border-radius:.75rem;background:#ffffff;border:1px solid #e5e7eb;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.brand{font-weight:700;font-size:1.1rem;letter-spacing:.02em;color:#111827}
.brand span{color:#2563eb}
.header-meta{font-size:.8rem;color:#6b7280;display:flex;align-items:center;gap:.35rem}
.header-label{font-weight:500;color:#111827}
.header-separator{color:#9ca3af}
.theme-toggle{margin-left:.75rem;border:none;background:transparent;cursor:pointer;font-size:1rem}
.main-layout{flex:1;display:flex;gap:1.25rem;min-height:0;overflow:hidden}
.list-panel{flex:0 0 320px;max-width:360px;border-right:1px solid #e5e7eb;padding-right:1rem;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.detail-panel{flex:1;padding-left:.25rem;overflow-y:auto;overflow-x:hidden;min-height:0}
.detail-panel h1{margin-top:.25rem}
.list-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.35rem;font-size:.8rem;color:#9ca3af}
.list-title{font-weight:600;color:#111827}
.list-meta{display:flex;gap:.5rem}
.list-count{color:#6b7280}
.list-sort{color:#9ca3af}
.list-search{margin-bottom:.6rem}
.list-search input{width:100%;background:#ffffff;border:1px solid #e5e7eb;border-radius:999px;padding:.4rem .8rem;font-size:.85rem;color:#111827;box-shadow:0 1px 2px rgba(15,23,42,.02)}
.list-search input::placeholder{color:#9ca3af}
.filter-bar{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}
.filter-bar button{background:#eef2ff;border:1px solid #e5e7eb;color:#374151;padding:.3rem .8rem;border-radius:999px;font-size:.75rem;cursor:pointer}
.filter-bar button:hover{background:#e0e7ff}
#list{list-style:none;display:flex;flex-direction:column;gap:.35rem;overflow:auto;padding-right:.25rem;flex:1;min-height:0}
.writeup-item{border-radius:.5rem}
.writeup-link{display:block;border:1px solid #e5e7eb;border-radius:.5rem;padding:.55rem .75rem;background:#ffffff;transition:background .15s,border-color .15s,box-shadow .15s,transform .05s}
.writeup-item:hover .writeup-link{background:#f9fafb;border-color:#cbd5f5;transform:translateX(1px);box-shadow:0 1px 2px rgba(15,23,42,.05)}
.writeup-item.active .writeup-link{border-color:#2563eb;background:#eff6ff;box-shadow:0 0 0 1px rgba(37,99,235,.3)}
.writeup-meta{display:flex;align-items:center;gap:.5rem;font-size:.75rem;color:#6b7280;margin-bottom:.2rem}
.writeup-title{font-weight:600;font-size:.9rem;margin-bottom:.1rem;color:#111827;word-break:break-word}
.writeup-summary{font-size:.85rem;color:#4b5563}
.date{font-size:.75rem;color:#9ca3af}
.empty-state,.empty-detail{font-size:.9rem;color:#6b7280;margin-top:.5rem}
.badge{display:inline-block;padding:.1rem .6rem;border-radius:999px;font-size:.7rem;font-weight:600;color:#111827}
.badge.Critical{background:#fee2e2}
.badge.High{background:#fed7aa}
.badge.Medium{background:#fef3c7}
.badge.Low{background:#bbf7d0}
.badge.dup{background:#d6d3d1;color:#111827}
.badge.bounty{background:#bbf7d0;color:#166534}

.form-inline{display:flex;gap:1rem;margin-top:.5rem;margin-bottom:.25rem;font-size:.85rem;color:#4b5563}
.checkbox-inline{display:flex;align-items:center;gap:.35rem}
.checkbox-inline input{width:auto}
textarea,input,select{width:100%;background:#ffffff;color:#111827;border:1px solid #e5e7eb;border-radius:.5rem;padding:.4rem .6rem}
textarea{min-height:160px;font-family:monospace;font-size:.85rem}
form{display:flex;flex-direction:column;gap:.75rem;max-width:640px;margin:2rem auto;padding:1.5rem;border-radius:.75rem;border:1px solid #e5e7eb;background:#ffffff;box-shadow:0 1px 2px rgba(15,23,42,.04)}
form.login{max-width:360px}
h1,h2{margin-bottom:.5rem}
button{background:#2563eb;border:none;border-radius:.5rem;padding:.5rem .9rem;color:#ffffff;font-weight:600;cursor:pointer;font-size:.9rem}
button:hover{background:#1d4ed8}
.poc-block{background:#0f172a;border-radius:.75rem;border:1px solid #020617;padding:1rem;overflow:visible;margin-top:1rem;color:#e5e7eb;font-family:monospace;font-size:.85rem;line-height:1.5;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.poc-block .poc-image-inline{display:block;max-width:100%;margin:.75rem 0;border-radius:.75rem;border:1px solid #e5e7eb}
.poc-block .poc-inline-code{display:inline-block;padding:0 .35rem;border-radius:.25rem;border:1px solid #1f2937;background:#020617}
.poc-block .poc-u{text-decoration:underline}
pre{background:#0f172a;border-radius:.75rem;border:1px solid #020617;padding:1rem;overflow-y:auto;overflow-x:hidden;margin-top:1rem;color:#e5e7eb;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.detail-title{font-size:1.6rem;margin-bottom:.5rem;color:#111827}
.detail-meta{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem;font-size:.8rem;color:#6b7280}
.detail-summary{margin-top:.5rem;margin-bottom:1rem;color:#374151}
.share-btn{margin-top:1rem}
.detail-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem;font-size:.8rem;color:#6b7280}
.detail-program{display:flex;align-items:center;gap:.35rem}
.program-label{color:#9ca3af}
.program-name{font-weight:500;color:#111827}
.poc-images{display:flex;flex-direction:column;gap:.75rem;margin-top:.5rem}
.poc-image{max-width:100%;border-radius:.75rem;border:1px solid #e5e7eb;background:#020617}
.poc-images-admin{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem}
.poc-image-row{display:flex;align-items:center;gap:.75rem;font-size:.8rem}
.poc-image-thumb{width:120px;border-radius:.5rem;border:1px solid #e5e7eb}
.poc-token{font-size:.75rem;color:#6b7280;margin-bottom:.25rem}
.theme-dark body{background:#020617;color:#e5e7eb}
.theme-dark a{color:#60a5fa}
.theme-dark .layout{background:transparent}
.theme-dark .site-header{background:linear-gradient(90deg,#020617,#020617,#0b1120);border-color:#111827;box-shadow:0 1px 2px rgba(15,23,42,.4)}
.theme-dark .brand{color:#e5e7eb}
.theme-dark .brand span{color:#60a5fa}
.theme-dark .header-meta{color:#9ca3af}
.theme-dark .header-label{color:#e5e7eb}
.theme-dark .list-header{color:#9ca3af}
.theme-dark .list-title{color:#f9fafb}
.theme-dark .list-count,.theme-dark .list-sort{color:#9ca3af}
.theme-dark .list-panel{border-right-color:#111827}
.theme-dark .list-search input{background:#020617;border-color:#111827;color:#e5e7eb;box-shadow:none}
.theme-dark .list-search input::placeholder{color:#6b7280}
.theme-dark .filter-bar button{background:#111827;border-color:#1f2937;color:#e5e7eb}
.theme-dark .filter-bar button:hover{background:#1f2937}
.theme-dark #list .writeup-link{background:#020617;border-color:#111827}
.theme-dark #list .writeup-item:hover .writeup-link{background:#020617;border-color:#374151;box-shadow:0 1px 2px rgba(15,23,42,.6)}
.theme-dark #list .writeup-item.active .writeup-link{background:#020617;border-color:#60a5fa;box-shadow:0 0 0 1px rgba(96,165,250,.5)}
.theme-dark .writeup-title{color:#f9fafb}
.theme-dark .writeup-meta{color:#9ca3af}
.theme-dark .writeup-summary{color:#e5e7eb}
.theme-dark .date{color:#9ca3af}
.theme-dark .empty-state,.theme-dark .empty-detail{color:#9ca3af}
.theme-dark .admin-list{background:#020617;border-color:#111827;box-shadow:0 1px 2px rgba(15,23,42,.6)}
.theme-dark .admin-row-title{color:#f9fafb}
.theme-dark .admin-row-meta{color:#9ca3af}
.theme-dark form{background:#020617;border-color:#111827;box-shadow:0 1px 2px rgba(15,23,42,.6)}
.theme-dark .form-inline{color:#e5e7eb}
.theme-dark textarea,.theme-dark input,.theme-dark select{background:#020617;color:#e5e7eb;border-color:#1f2937}
.theme-dark .detail-title{color:#e5e7eb}
.theme-dark .detail-summary{color:#e5e7eb}
.theme-dark .detail-meta{color:#9ca3af}
.theme-dark .detail-header{color:#9ca3af}
.theme-dark .program-name{color:#e5e7eb}
.theme-dark .poc-image{border-color:#111827}
.theme-dark .poc-image-thumb{border-color:#111827}
.admin-main{flex:1;display:flex;gap:1.25rem}
.admin-sidebar{flex:0 0 200px;max-width:220px}
.admin-content{flex:1}
.primary-btn{width:100%;padding:.55rem .9rem;border-radius:.5rem;background:#2563eb;color:#ffffff;font-weight:600;border:none;font-size:.9rem;cursor:pointer}
.primary-btn:hover{background:#1d4ed8}
.admin-list{list-style:none;margin-top:1rem;border-radius:.75rem;border:1px solid #e5e7eb;background:#ffffff;box-shadow:0 1px 2px rgba(15,23,42,.03);padding:.5rem 0}
.admin-row{border-bottom:1px solid #e5e7eb}
.admin-row:last-child{border-bottom:none}
.admin-row-main{display:block;padding:.55rem 1rem}
.admin-row-title{font-size:.95rem;font-weight:500;color:#111827;margin-bottom:.1rem}
.admin-row-meta{font-size:.8rem;color:#6b7280;display:flex;align-items:center;gap:.4rem}
.form-actions{display:flex;gap:.75rem;align-items:center;margin-top:.5rem}
.danger-btn{background:#dc2626;color:#ffffff}
.danger-btn:hover{background:#b91c1c}
.form-page{overflow:auto}
.form-page .layout{height:auto;min-height:100vh;overflow:visible}
.form-page textarea[name="content"]{min-height:260px;overflow:hidden}
@media (max-width:640px){
  body{overflow:auto}
  .layout{padding:1rem;height:auto;min-height:100vh;overflow:visible}
  .main-layout{flex-direction:column}
  .list-panel{flex:0 0 auto;max-width:none;border-right:none;border-bottom:1px solid #e5e7eb;padding-right:0;padding-bottom:1rem;overflow:visible}
  #list{flex:none;max-height:none}
  .detail-panel{padding-left:0;overflow:visible}
  .admin-main{flex-direction:column}
  .admin-sidebar{max-width:none}
}
