* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: sans-serif;
  background: #111;
  color: #eee;
}

#app {
  display: flex;
  min-height: 100vh;
}

#sidebar {
  width: 240px;
  background: #191919;
  border-right: 1px solid #2a2a2a;
  padding: 20px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid #333;
  background: #202020;
  color: #eee;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
}

.nav-btn:hover {
  background: #2a2a2a;
}

.nav-btn.active {
  background: #2f3f5f;
  border-color: #4a6aa8;
}

#main {
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

h1 {
  margin-top: 0;
}


.card {
	background: #1e1e1e;
	padding: 16px;
	border-radius: 8px;
	margin-bottom: 16px;
}

.card-title {
	font-weight: bold;
	margin-bottom: 8px;
}

.card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.blog-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-header p {
  margin: 8px 0 0;
  color: #b4b4b4;
}

.blog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-crumb {
  border: 1px solid #3a3a3a;
  background: #1e1e1e;
  color: #ddd;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.blog-crumb.current {
  background: #2f3f5f;
  border-color: #4a6aa8;
  cursor: default;
}

.blog-status {
  color: #c8c8c8;
}

.blog-status.error {
  color: #ff9f9f;
}

.blog-browser {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.blog-list-panel,
.blog-reader {
  background: #181818;
  border: 1px solid #2c2c2c;
  border-radius: 14px;
  padding: 18px;
  min-height: 320px;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-entry {
  width: 100%;
  border: 1px solid #333;
  background: #202020;
  color: #eee;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.blog-entry:hover {
  background: #272727;
}

.blog-entry.active {
  border-color: #4a6aa8;
  background: #24324b;
}

.blog-entry-title {
  display: block;
  font-size: 0.98rem;
  line-height: 1.35;
}

.blog-entry-directory {
  color: #c9d9ff;
}

.blog-empty,
.blog-reader-placeholder {
  color: #bdbdbd;
  line-height: 1.6;
}

.blog-reader {
  overflow-wrap: anywhere;
}

.blog-reader h1,
.blog-reader h2,
.blog-reader h3,
.blog-reader h4,
.blog-reader h5,
.blog-reader h6 {
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.blog-reader h1:first-child,
.blog-reader h2:first-child,
.blog-reader h3:first-child {
  margin-top: 0;
}

.blog-reader p,
.blog-reader li,
.blog-reader blockquote {
  line-height: 1.7;
}

.blog-reader pre {
  overflow-x: auto;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 14px;
}

.blog-reader code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.blog-reader pre code {
  background: transparent;
}

.blog-reader :not(pre) > code {
  background: #202020;
  border: 1px solid #343434;
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

.blog-reader blockquote {
  margin: 1.2em 0;
  padding-left: 16px;
  border-left: 3px solid #4a6aa8;
  color: #cbcbcb;
}

.blog-reader a {
  color: #8fb3ff;
}

@media (max-width: 900px) {
  #app {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #2a2a2a;
  }

  .blog-browser {
    grid-template-columns: 1fr;
  }
}
