/* blog.btw.bio and status.btw.bio (src/views/blog.ts): one screen each, the content scrolls inside; flat cards. */

/* ---------- Blog list ---------- */
.blog { max-width: 860px; }
.blog-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.blog-chips::-webkit-scrollbar { display: none; }
.blog-chip { flex: none; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 14px; font-weight: 600; }
.blog-chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.18); }
.blog-chip[aria-current] { color: #fff; background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.45); }
.blog-list { display: grid; gap: 12px; }
.blog-card { display: grid; gap: 8px; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); color: var(--text); transition: border-color 0.15s; }
.blog-card:hover { border-color: rgba(var(--accent-rgb), 0.45); }
.blog-card.is-pinned { border-color: rgba(var(--accent-rgb), 0.3); }
.blog-card h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.blog-card p { line-height: 1.55; }
.blog-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #ff6b75; }
.blog-more .icon { width: 15px; height: 15px; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--faint); }
.blog-cat { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.cat-update { color: #ff6b75; }
.cat-news { color: #60a5fa; }
.cat-faq { color: #a78bfa; }
.cat-guide { color: #34d399; }
.cat-incident { color: #fbbf24; }
.blog-pin { display: inline-flex; align-items: center; gap: 4px; }
.blog-pin .icon { width: 13px; height: 13px; }
.blog-empty { text-align: center; padding: 40px 0; }

/* ---------- One post ---------- */
.blog-post { max-width: 760px; display: grid; gap: 14px; }
.blog-back { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--muted); font-size: 14px; font-weight: 600; }
.blog-back:hover { color: var(--text); }
.blog-back .icon { width: 15px; height: 15px; }
.blog-post h1 { font-size: clamp(30px, 5.5vw, 44px); line-height: 1.12; letter-spacing: -0.03em; }
.blog-lead { font-size: 18px; line-height: 1.6; color: var(--muted); }
.blog-draft { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); color: #fcd34d; font-size: 14px; font-weight: 600; }
.prose { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 16.5px; line-height: 1.75; color: #d4d4d8; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--text); line-height: 1.3; margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 19px; }
.prose h4 { font-size: 16.5px; }
.prose a { color: #ff6b75; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); font-size: 0.9em; }
.prose pre { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(0, 0, 0, 0.35); overflow-x: auto; line-height: 1.55; }
.prose pre code { padding: 0; background: none; }
.prose blockquote { padding: 4px 16px; border-inline-start: 3px solid rgba(var(--accent-rgb), 0.6); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

/* ---------- Status ---------- */
.status { max-width: 1100px; }
.st-banner { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); margin-bottom: 18px; }
.st-banner > div { display: grid; gap: 2px; }
.st-banner b { font-size: 18px; }
.st-banner span { font-size: 14px; }
.st-banner > i, .st-state i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--st); }
.st-ok { --st: #22c55e; }
.st-degraded { --st: #f59e0b; }
.st-down { --st: #ef4444; }
.st-unknown, .st-none { --st: #52525b; }
.st-banner.st-ok { border-color: rgba(34, 197, 94, 0.35); }
.st-banner.st-degraded { border-color: rgba(245, 158, 11, 0.4); }
.st-banner.st-down { border-color: rgba(239, 68, 68, 0.45); }
.st-parts { list-style: none; margin: 0; padding: 0; display: grid; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); overflow: hidden; }
.st-part { padding: 18px 20px; display: grid; gap: 8px; }
.st-part + .st-part { border-top: 1px solid var(--border); }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.st-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--st); }
.st-state i { width: 9px; height: 9px; }
.st-hint { font-size: 13px; margin-top: -4px; }
.st-bars { display: flex; gap: 2px; height: 34px; }
.st-bar { flex: 1; min-width: 0; border-radius: 3px; background: var(--st); opacity: 0.9; }
.st-bar.st-none { opacity: 0.35; }
.st-bar:hover { opacity: 1; }
.st-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.st-incidents { display: grid; gap: 12px; align-content: start; }
.st-incidents h2 { font-size: 20px; }
.st-incidents ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.st-incidents a { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel); color: var(--text); }
.st-incidents a:hover { border-color: rgba(var(--accent-rgb), 0.45); }
.st-incidents a span { font-size: 14px; }

/* Phones: the last 30 days only (90 bars are too thin to read). */
@media (max-width: 560px) {
  .st-bar:nth-child(-n + 60) { display: none; }
  .st-foot span:first-child { visibility: hidden; }
  .blog-card { padding: 16px; }
}

/* ---------- Pictures (markdown.ts: a post's first picture is its cover on the list) ---------- */
.blog-card-text { display: grid; gap: 8px; min-width: 0; }
.blog-card.has-cover { grid-template-columns: minmax(0, 1fr) 240px; align-items: center; gap: 20px; }
.blog-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04); }
.prose figure { margin: 1.6em 0; display: grid; gap: 8px; }
.prose figure img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); }
.prose figcaption { text-align: center; font-size: 14px; color: var(--faint); }
@media (max-width: 640px) {
  .blog-card.has-cover { grid-template-columns: 1fr; }
  .blog-card.has-cover .blog-cover { order: -1; }
}

/* ---------- One screen: navigation, the top (title, search, chips), the scrolling content ---------- */
.sub-body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.sub-body > .site-nav { position: relative; flex: none; }
.sub-app { position: relative; isolation: isolate; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sub-app > .hero-bg { inset: 0; }
.sub-top { flex: none; display: grid; gap: 12px; padding-top: 22px; padding-bottom: 14px; }
.sub-top-blog { max-width: 860px; }
.sub-top-blog-post { max-width: 760px; }
.sub-top-status { max-width: 1100px; }
.sub-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.sub-title h1 { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(22px, 4vw, 30px); letter-spacing: -0.02em; }
.sub-title h1 .icon { width: 24px; height: 24px; color: #ff6b75; }
.sub-feed { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sub-feed:hover { color: var(--text); }
.sub-feed .icon { width: 15px; height: 15px; }
.sub-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel); }
.sub-search:focus-within { border-color: rgba(var(--accent-rgb), 0.55); box-shadow: var(--ring); }
.sub-search > .icon { flex: none; width: 18px; height: 18px; color: var(--faint); }
.sub-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font-size: 15px; }
.sub-search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.sub-search .btn { flex: none; height: 36px; border-radius: 10px; }
.sub-results { font-size: 14px; }
.sub-results a { color: #ff6b75; font-weight: 600; }
.sub-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 28px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.sub-scroll > .container { padding-top: 4px; }

/* Who wrote a post. */
.blog-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.blog-author { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; }
.blog-author b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blog-avatar { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; background: rgba(var(--accent-rgb), 0.18); color: #fff; font-size: 11px; font-weight: 700; }
.blog-avatar img { width: 100%; height: 100%; object-fit: cover; }
.blog-author-text { display: grid; min-width: 0; }
.blog-author.is-big { width: fit-content; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); }
.blog-author.is-big:hover { border-color: rgba(var(--accent-rgb), 0.45); }
.blog-author.is-big .blog-avatar { width: 36px; height: 36px; font-size: 14px; }
.blog-author.is-big small { font-size: 11px; color: var(--faint); }
.blog-author.is-big b { font-size: 14px; }

/* Status: the parts on the left, incidents on the right (one column on phones). */
.status { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.st-main { min-width: 0; }
@media (max-width: 900px) {
  .status { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .sub-top { padding-top: 14px; gap: 10px; }
  .sub-search { height: 44px; }
  .sub-search .btn { display: none; }
}
