:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #4f46e5;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: #1d4ed8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.blog-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(120deg, #0b2a57, #0f3b7f 48%, #0b2a57);
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(3, 29, 66, 0.35);
}

.blog-topbar-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-brand {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.blog-brand:hover {
  text-decoration: none;
}

.blog-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  font-size: 16px;
  line-height: 1;
}

.blog-brand-text {
  display: inline-block;
}

.blog-nav,
.blog-account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-nav a,
.blog-account a {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}

.blog-nav a:hover,
.blog-account a:hover {
  color: #ffffff;
}

.blog-account-email {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.blog-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 20px 18px 40px;
}

.blog-flash {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 14px;
}

.blog-flash-success {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}

.blog-flash-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.blog-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.blog-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 76px;
}

.blog-side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.blog-side-card h2,
.blog-side-card h3 {
  margin: 0;
  font-size: 16px;
}

.blog-filter-form {
  display: grid;
  gap: 8px;
}

.blog-filter-form label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.blog-filter-form input,
.blog-filter-form select,
.blog-filter-form button {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px;
  font-size: 13px;
}

.blog-filter-form button {
  cursor: pointer;
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
}

.blog-destination-links {
  display: grid;
  gap: 6px;
}

.blog-destination-links a {
  font-size: 13px;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f9fafb;
}

.blog-destination-links a:hover {
  text-decoration: none;
  border-color: #c7d2fe;
  background: #eef2ff;
}

.blog-latest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.blog-latest-list li {
  display: grid;
  gap: 3px;
}

.blog-latest-list li span {
  font-size: 11px;
  color: var(--muted);
}

.blog-rss-link {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.blog-main {
  display: grid;
  gap: 14px;
}

.blog-main-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.02em;
}

.blog-main-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.blog-result-count {
  font-size: 12px;
}

.blog-post-card {
  --post-accent: var(--accent);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--post-accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.blog-post-head h1,
.blog-post-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 30px);
  letter-spacing: -0.01em;
}

.blog-post-head h2 {
  font-size: clamp(20px, 2.4vw, 28px);
}

.blog-post-head h2 a,
.blog-post-head h1 a {
  color: #0f172a;
}

.blog-post-head h2 a:hover,
.blog-post-head h1 a:hover {
  color: #1d4ed8;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.blog-post-excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #1f2937;
}

.blog-read-more,
.blog-back-link {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
}

.blog-read-more:hover,
.blog-back-link:hover {
  text-decoration: none;
  background: #dbeafe;
}

.blog-post-body {
  color: #111827;
  line-height: 1.7;
  font-size: 15px;
}

.blog-post-body p {
  margin: 0 0 10px;
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 0 0 12px 22px;
}

.blog-comment-list {
  display: grid;
  gap: 10px;
}

.blog-comment-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.blog-comment-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.blog-editor-shell {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
}

.blog-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 6px;
}

.blog-editor-toolbar button {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  min-width: 30px;
  height: 30px;
  cursor: pointer;
}

.blog-editor {
  min-height: 130px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.5;
  background: #ffffff;
}

.blog-comment-submit {
  margin-top: 10px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px;
}

.blog-pagination a {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: #ffffff;
  color: #1f2937;
}

.blog-pagination a.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.blog-pagination span {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 1040px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .blog-topbar-inner {
    padding: 10px 12px;
  }

  .blog-shell {
    padding: 14px 12px 30px;
  }

  .blog-post-card {
    padding: 12px;
  }
}
