:root{
  --bg:#0f1115;
  --card:#171a21;
  --soft:#1f2430;
  --text:#eef2ff;
  --muted:#aeb7d0;
  --line:#2a3142;
  --accent:#7c9cff;
  --accent-2:#b0c1ff;
  --success:#1f8f5f;
  --danger:#c94b61;
  --warning:#d89b2b;
  --shadow:0 14px 34px rgba(0,0,0,.26);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Tahoma,Arial,sans-serif;line-height:1.7}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-2)}
img{max-width:100%;display:block}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.container{width:min(1100px,calc(100% - 32px));margin:auto}
.main-content{padding:30px 0 50px}
.site-header,.site-footer{background:#0b0d11;border-bottom:1px solid var(--line)}
.site-footer{border-top:1px solid var(--line);border-bottom:none;margin-top:60px}
.header-row,.footer-grid{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0}
.site-logo{display:inline-flex;align-items:center;gap:14px;color:#fff;min-height:58px;max-width:min(100%,360px);flex:0 0 auto}
.site-logo.has-image{font-size:0}
.site-logo-text{font-size:24px;font-weight:700;line-height:1.15;white-space:nowrap}
.site-nav{display:flex;gap:18px;flex-wrap:wrap}
.hero-card,.empty-box,.post-card,.single-post,.flash,.admin-card,.login-card{background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}
.hero-card{padding:28px;margin-bottom:24px}
.pill{display:inline-block;padding:6px 12px;border-radius:999px;background:rgba(124,156,255,.12);border:1px solid rgba(124,156,255,.25);color:var(--accent-2);font-size:13px}
.hero-card h1{margin:12px 0 10px;font-size:34px;line-height:1.2}
.hero-card p,.empty-box,.muted{color:var(--muted)}
.post-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px}
.post-card{overflow:hidden}
.post-card-body{padding:18px}
.post-meta{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:13px;margin-bottom:10px}
.post-meta span{padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06)}
.post-card h2,.post-card h3{margin:0 0 10px;font-size:21px;line-height:1.35}
.post-card p{margin:0 0 14px;color:var(--muted)}
.post-image{width:100%;height:220px;object-fit:cover;background:#0b0d11}
.post-cover-link{display:block;background:#0b0d11}
.post-cover{width:100%;aspect-ratio:1/1;object-fit:cover;background:#0b0d11}
.read-more,.btn,.button-link,button,input[type=submit]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 16px;border-radius:12px;border:1px solid rgba(124,156,255,.28);background:rgba(124,156,255,.14);color:#fff;cursor:pointer;font-weight:700}
.read-more:hover,.btn:hover,.button-link:hover,button:hover,input[type=submit]:hover{background:rgba(124,156,255,.22)}
.btn-secondary{background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.1)}
.btn-danger{background:rgba(201,75,97,.14);border-color:rgba(201,75,97,.28)}
.btn-success{background:rgba(31,143,95,.16);border-color:rgba(31,143,95,.35)}
.pagination{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:26px}
.pagination a{padding:10px 14px;border-radius:12px;background:var(--soft);border:1px solid var(--line);color:#fff}
.pagination a.active{background:rgba(124,156,255,.14);border-color:rgba(124,156,255,.3)}
.single-post{padding:28px}
.single-post h1{margin:6px 0 18px;font-size:36px;line-height:1.3}
.single-image{width:100%;max-height:480px;object-fit:cover;border-radius:18px;border:1px solid var(--line);margin-bottom:20px}
.article-content h2{margin-top:28px;font-size:28px}
.article-content h3{margin-top:22px;font-size:22px}
.article-content p,.article-content li{color:#dde3f8}
.article-content ul,.article-content ol{padding-right:22px}
.image-credit{margin-top:22px;padding:14px 16px;border-radius:14px;background:rgba(255,255,255,.03);color:var(--muted);border:1px solid var(--line)}
.related-posts{margin-top:34px}
.footer-grid p{margin:6px 0 0;color:var(--muted)}

.admin-body{background:#090b0e}
.admin-shell{display:grid;grid-template-columns:280px 1fr;min-height:100vh}
.admin-sidebar{padding:22px;border-left:1px solid var(--line);background:#0b0d11;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:10px;font-size:24px;font-weight:800;margin-bottom:22px;min-height:48px}
.brand-emoji{flex:0 0 auto}
.admin-brand-text{line-height:1.2;word-break:break-word}
.admin-sidebar nav{display:grid;gap:10px}
.admin-sidebar nav a{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.05);color:#fff}
.admin-main{padding:28px}
.admin-topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}
.admin-topbar h1{margin:0}
.flash{padding:14px 16px;margin-bottom:18px}
.flash-success{border-color:rgba(31,143,95,.35);background:rgba(31,143,95,.12)}
.flash-error{border-color:rgba(201,75,97,.35);background:rgba(201,75,97,.12)}
.flash-warning{border-color:rgba(216,155,43,.35);background:rgba(216,155,43,.12)}
.stats-grid,.grid-2,.grid-3{display:grid;gap:18px}
.stats-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.admin-card{padding:20px}
.admin-card h3{margin-top:0}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;background:var(--card);border-radius:18px;overflow:hidden;border:1px solid var(--line)}
th,td{padding:14px 12px;border-bottom:1px solid var(--line);text-align:right;vertical-align:top}
th{background:#111520;color:#fff}
tr:last-child td{border-bottom:none}
label{display:block;font-weight:700;margin:0 0 8px}
input[type=text],input[type=password],input[type=url],input[type=datetime-local],input[type=time],input[type=number],textarea,select{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:#0d1016;color:#fff;outline:none}
textarea{min-height:120px;resize:vertical}
input:focus,textarea:focus,select:focus{border-color:rgba(124,156,255,.45);box-shadow:0 0 0 3px rgba(124,156,255,.12)}
.form-row{margin-bottom:16px}
.form-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}
.badge{display:inline-flex;padding:4px 10px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.03);font-size:12px}
.badge-success{background:rgba(31,143,95,.12);border-color:rgba(31,143,95,.28)}
.badge-danger{background:rgba(201,75,97,.12);border-color:rgba(201,75,97,.28)}
.badge-warning{background:rgba(216,155,43,.12);border-color:rgba(216,155,43,.28)}
.inline-actions{display:flex;gap:8px;flex-wrap:wrap}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}
.login-card{width:min(450px,100%);padding:26px}
.login-card h1{margin-top:0}
.help-text{color:var(--muted);font-size:13px;margin-top:6px}
.code-box{padding:14px;border-radius:14px;background:#0d1016;border:1px solid var(--line);overflow:auto}
@media (max-width:900px){
  .admin-shell{grid-template-columns:1fr}
  .admin-sidebar{position:static;height:auto;border-left:none;border-bottom:1px solid var(--line)}
  .admin-topbar,.header-row,.footer-grid{flex-direction:column;align-items:flex-start}
  .site-logo{min-height:auto;max-width:100%}
}
.site-logo-img{
  display:block !important;
  height:56px;
  width:auto !important;
  max-width:min(100%,260px);
  max-height:none;
  object-fit:contain;
  object-position:center right;
  border-radius:8px;
  flex:0 0 auto;
}

.admin-brand-img{
  display:block !important;
  height:42px;
  width:auto !important;
  max-width:100%;
  max-height:none;
  object-fit:contain;
  object-position:center right;
  border-radius:8px;
  flex:0 0 auto;
}

.setting-image-preview{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:96px;
  min-width:96px;
  max-width:100%;
  padding:10px;
  margin-bottom:10px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:#0d1016;
}

.logo-preview-img{
  max-height:84px;
  width:auto;
  max-width:100%;
  object-fit:contain;
}

.favicon-preview-img{
  width:48px;
  height:48px;
  object-fit:contain;
}

@media (max-width:640px){
  .site-logo-img{height:44px;max-width:220px}
  .site-logo-text{font-size:20px}
  .admin-brand-img{height:36px}
}


.article-content a{
  text-decoration:underline;
  text-underline-offset:3px;
}
.article-link-box{
  margin-top:28px;
  padding:18px 20px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
}
.article-link-box h2{
  margin:0 0 10px;
  font-size:22px;
}
.article-link-box ul{
  margin:0;
  padding-right:22px;
}
.article-link-box li+li{
  margin-top:8px;
}
.article-link-box-external{
  background:rgba(124,156,255,.08);
  border-color:rgba(124,156,255,.2);
}
.post-image-link{
  display:block;
  overflow:hidden;
}
.post-image,
.single-image{
  height:auto;
}
.single-image{
  aspect-ratio:16/9;
}


.homepage-map-box{
  margin:0 0 26px;
  padding:22px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
}
.homepage-map-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.homepage-map-head h2{
  margin:10px 0 8px;
  font-size:28px;
  line-height:1.25;
}
.homepage-map-head p{
  margin:0;
  color:var(--muted);
}
.homepage-map-frame-wrap{
  overflow:hidden;
  border-radius:18px;
  border:1px solid var(--line);
  background:#0b0d11;
}
.homepage-map-frame{
  display:block;
  width:100%;
  height:380px;
  border:0;
}
@media (max-width:900px){
  .homepage-map-head{
    flex-direction:column;
    align-items:flex-start;
  }
}
@media (max-width:640px){
  .homepage-map-box{
    padding:18px;
  }
  .homepage-map-head h2{
    font-size:24px;
  }
  .homepage-map-frame{
    height:320px;
  }
}

.hero-card,
.topic-hero{
  display:grid;
  grid-template-columns:1.3fr .9fr;
  gap:24px;
  margin:0 0 26px;
  padding:28px;
  background:linear-gradient(180deg, rgba(124,156,255,.08), rgba(124,156,255,.02));
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
}
.hero-card h1,
.topic-hero h1{
  margin:8px 0 12px;
  font-size:clamp(28px, 4vw, 42px);
  line-height:1.2;
}
.hero-card p,
.topic-hero p{
  margin:0;
  color:var(--muted);
  font-size:16px;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(124,156,255,.12);
  color:var(--text);
  font-size:13px;
  font-weight:700;
}
.hero-actions,
.topic-stats{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}
.btn-primary,
.btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
}
.btn-primary{
  background:var(--accent);
  color:#0b1020;
}
.btn-secondary{
  background:rgba(255,255,255,.04);
  color:var(--text);
  border:1px solid var(--line);
}
.hero-topics-box{
  align-self:stretch;
  padding:20px;
  border-radius:20px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
}
.mini-title{
  margin:0 0 12px;
  font-weight:700;
  font-size:15px;
}
.section-head{
  margin:0 0 18px;
}
.section-head h2,
.section-head h1{
  margin:0 0 8px;
}
.section-head p,
.related-head p{
  margin:0;
  color:var(--muted);
}
.topic-section{
  margin:0 0 28px;
}
.keyword-cloud{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.keyword-cloud.compact{
  gap:8px;
}
.keyword-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  background:rgba(124,156,255,.12);
  border:1px solid rgba(124,156,255,.18);
  color:var(--text);
  text-decoration:none;
  font-size:14px;
  font-weight:700;
}
.keyword-chip.small{
  min-height:32px;
  font-size:12px;
  padding:0 12px;
}
.keyword-chip.static{
  cursor:default;
}
.post-card-body{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.post-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0 0 18px;
  color:var(--muted);
  font-size:14px;
}
.breadcrumbs a{
  color:var(--muted);
  text-decoration:none;
}
.article-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  margin:14px 0 0;
  color:var(--muted);
  font-size:14px;
}
.article-excerpt{
  margin:16px 0 0;
  color:var(--muted);
  font-size:17px;
}
.article-toc{
  margin:26px 0;
  padding:20px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius:20px;
}
.article-toc-title{
  margin:0 0 14px;
  font-size:18px;
  font-weight:800;
}
.article-toc ul{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}
.article-toc a{
  color:var(--text);
  text-decoration:none;
}
.toc-sub-item{
  padding-inline-start:18px;
  color:var(--muted);
}
.article-bottom-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:26px;
  padding-top:18px;
  border-top:1px solid var(--line);
}
@media (max-width:900px){
  .hero-card,
  .topic-hero{
    grid-template-columns:1fr;
    padding:22px;
  }
}
@media (max-width:640px){
  .hero-card,
  .topic-hero{
    padding:18px;
    border-radius:20px;
  }
  .hero-card h1,
  .topic-hero h1{
    font-size:28px;
  }
  .article-toc{
    padding:16px;
  }
}



.post-cover-link{display:block;background:#0b0d11;aspect-ratio:1/1;overflow:hidden}
.post-cover{display:block;width:100%;height:100%;object-fit:cover;background:#0b0d11}
.post-card{overflow:hidden}
.post-card .post-body{padding:16px}
.post-card .post-title{font-size:1.02rem;line-height:1.5;min-height:3.1em}
.post-card .post-excerpt{font-size:.93rem;line-height:1.7;min-height:4.8em}
.posts-grid{display:grid;grid-template-columns:1fr;gap:16px}
@media (min-width: 1200px){
  .posts-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
}
@media (min-width: 900px) and (max-width: 1199px){
  .posts-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
}
@media (min-width: 600px) and (max-width: 899px){
  .posts-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
}
