
:root{
  --bg:#f6f8fb;
  --panel:#ffffff;
  --border:#dde5ee;
  --text:#0f172a;
  --muted:#64748b;
  --accent:#0f172a;
  --hover:#eef3f8;
  --link:#2563eb;
  --ok-bg:#ecfdf5;
  --ok-text:#166534;
  --warn-bg:#fff7ed;
  --warn-text:#9a3412;
  --error-bg:#fef2f2;
  --error-text:#991b1b;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:18px;
  padding:18px;
  max-width:1600px;
  margin:0 auto;
}
.sidebar,.content{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:22px;
  overflow:hidden;
}
.sidebar{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.sidebar-head{
  padding:22px 22px 14px;
  border-bottom:1px solid var(--border);
}
.sidebar-head h1{
  margin:0;
  font-size:28px;
  line-height:1.1;
}
.subtitle{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
}
.search-wrap{
  margin:16px;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
}
.search-wrap input{
  border:0;
  outline:none;
  width:100%;
  background:transparent;
  font:inherit;
  color:var(--text);
}
.sidebar-body{
  padding:4px 10px 18px;
  overflow:auto;
  min-height:0;
}
.tree-section{margin-bottom:10px}
.tree-header{
  width:100%;
  background:transparent;
  border:0;
  border-radius:10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:7px 10px;
  font-size:15px;
  font-weight:700;
  color:var(--text);
}
.tree-header:hover{background:var(--hover)}
.tree-left{display:flex;align-items:center;gap:10px}
.tree-count{font-size:12px;color:var(--muted)}
.tree-items{display:none;padding-left:18px}
.tree-section.open .tree-items{display:block}
.tree-folder{
  margin:2px 0 8px;
}
.tree-folder-header{
  width:100%;
  background:transparent;
  border:0;
  border-radius:8px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:5px 8px;
  font-size:14px;
  font-weight:600;
  color:#334155;
}
.tree-folder-header:hover{background:var(--hover)}
.tree-folder.open .tree-folder-items{display:block}
.tree-folder-items{display:none;padding-left:16px}
.tree-item{
  width:100%;
  background:transparent;
  border:0;
  border-radius:8px;
  cursor:pointer;
  text-align:left;
  padding:6px 8px;
  color:var(--text);
}
.tree-item:hover{background:var(--hover)}
.tree-item.active{background:#e8eef8}
.tree-item-title{font-size:14px;line-height:1.3}
.tree-empty{
  color:var(--muted);
  font-size:13px;
  padding:6px 8px;
}
.content{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.topbar{
  padding:16px 22px 0;
}
.breadcrumbs{
  min-height:20px;
  color:var(--muted);
  font-size:13px;
}
.hero{
  padding:18px 22px 10px;
  border-bottom:1px solid var(--border);
}
.hero h2{
  margin:16px 0 8px;
  font-size:34px;
  line-height:1.1;
}
.hero p{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
}
.status{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  font-weight:700;
}
.status.ok{background:var(--ok-bg);color:var(--ok-text)}
.status.warn{background:var(--warn-bg);color:var(--warn-text)}
.status.error{background:var(--error-bg);color:var(--error-text)}
.article-view{
  padding:24px 22px 34px;
  overflow:auto;
}
.article-card{
  max-width:980px;
}
.article-kicker{
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
}
.article-title{
  margin:10px 0 10px;
  font-size:46px;
  line-height:1.08;
}
.article-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:14px;
  margin-bottom:20px;
}
.featured-image{
  display:block;
  width:100%;
  max-width:920px;
  border-radius:18px;
  border:1px solid var(--border);
  margin:0 0 20px;
}
.article-brief{
  color:#334155;
  font-size:19px;
  line-height:1.75;
  margin-bottom:20px;
}
.article-details{
  color:#1e293b;
  font-size:17px;
  line-height:1.85;
}
.article-details img{
  max-width:100%;
  height:auto;
  border-radius:14px;
  border:1px solid var(--border);
}
.article-details h1,
.article-details h2,
.article-details h3{
  line-height:1.2;
  margin-top:28px;
}
.article-details ul,
.article-details ol{
  padding-left:24px;
}
.related-section{
  margin-top:34px;
  padding-top:22px;
  border-top:1px solid var(--border);
}
.related-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:12px;
  margin-top:14px;
}
.related-card{
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px 16px;
  background:#fff;
  cursor:pointer;
}
.related-card:hover{background:var(--hover)}
.related-title{
  font-weight:700;
  margin-bottom:6px;
}
.related-text{
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}
.empty-screen{
  max-width:700px;
  color:var(--muted);
  line-height:1.8;
  font-size:16px;
}
@media (max-width: 980px){
  .app-shell{grid-template-columns:1fr;padding:12px}
  .sidebar{min-height:320px}
  .article-title{font-size:36px}
}

.article-footer{
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
