:root{
  --bg:#0b0f17;
  --panel:#111827;
  --muted:#8b98a5;
  --text:#e5e7eb;
  --accent:hsl(160, 35%, 50%);
  --line:#1f2937;
  --chip:#0f172a;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,sans-serif;
}

/* === HEADER === */

.top{
  border-bottom:1px solid var(--line);
  background:rgba(17,24,39,.7);
  backdrop-filter:blur(6px);
}

.wrap {
  width: 100%;
  display: flex;
  gap: 12px;
  margin:0 auto;
  padding:14px 16px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tools {
  margin-left: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand .title{
  font-size:22px;
  font-weight:600;
}

.sub{
  color:var(--muted);
  font-size:13px;
}

.tools{
  margin-top:10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search{
  width:100%;
  box-sizing: border-box;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#020617;
  color:var(--text);
}

.search{
  width:100%;
  box-sizing:border-box;

  padding:8px 10px;
  border-radius:8px;

  border:1px var(--accent);                  /* ← яркая рамка всегда */
  background:var(--bg);
  color:var(--text);

  box-shadow:0 0 0 2px var(--accent); /* ← мягкое свечение */
}

.hint{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}

/* === LAYOUT (GRID + SPLITTER) === */

main.wrap.layout{
  display:grid;
  grid-template-columns: var(--sb, 320px) 8px 1fr;
  gap:0;
  height:calc(100vh - 110px);
  min-height:0;
}

/* sidebar */
.sidebar{
  overflow:auto;
  padding-right:10px;
}

/* content */
.content{
  overflow:auto;
  min-width:0;
  padding-left:14px;
}

/* archive */
#archive{
  display: none;
}

/* splitter */
#splitter{
  cursor:col-resize;
  background:rgba(255,255,255,0.05);
  user-select:none;
  -webkit-user-select:none;
  touch-action:none;
}

#splitter:hover{
  background:rgba(255,255,255,0.18);
}

/* === SIDEBAR === */

.sidebox{
  margin-bottom:14px;
}

.sidehdr{
  font-size:13px;
  color:var(--muted);
  margin-bottom:8px;
}

/* === TAGS === */

.tagcloud{
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  gap:6px;
}

.tagchip{
  display:inline-flex;
  justify-content:flex-start;
  width: auto;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:var(--chip);
  cursor:pointer;
  font-size:13px;
  border:1px solid var(--line);
}

/* .tagchip:hover{
  border-color:var(--accent);
} */
.tagchip:hover{
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.tagchip.active{
  background:var(--accent);
  color:#000;
}

.tagchip .cnt{
    margin-left: 6px;
  font-size:11px;
  opacity:.7;
}

/* === YEARS === */

/* archive */
#yearsNav{
  display: none;
}

.years-top{
  margin-bottom:10px;
}

.years{
  display:flex; 
  flex-wrap:wrap;
  gap:6px;
}

.years a{
  padding:4px 10px;
  border-radius:999px;
  background:var(--chip);
  font-size:12px;
  text-decoration:none;
  color:var(--text);
}

.years a:hover{
  border:1px solid var(--accent);
}

/* === STATS === */

.stats{
  font-size:13px;
  color:var(--muted);
  margin-bottom:10px;
}

/* === RESULTS === */

.results{
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* пост */
.postlink{
  display:flex;
  justify-content:space-between;
  padding:8px 10px;
  border-radius:8px;
  text-decoration:none;
  color:var(--text);
  background:rgba(255,255,255,0.02);
  border:1px solid var(--line);
}

.postlink:hover{
  border-color:var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.postlink .t{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.postlink .ext{
  opacity:.5;
}

/* === UTILS === */

.muted{color:var(--muted)}
.small{font-size:12px}

button.btn{
  padding:6px 10px;
  border-radius:6px;
  border:1px solid var(--line);
  background:#020617;
  color:var(--text);
  cursor:pointer;
}

button.btn:hover{
  border-color:var(--accent);
}
/* === Scrollbars (Firefox + Chromium/WebKit) === */

/* Firefox */
*{
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.22) rgba(255,255,255,0.06);
}

/* Chromium/WebKit */
*::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0); /* чтобы выглядел "пухлее" */
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,0.32);
  background-clip: padding-box;
}
