:root {
  --red: #c8102e;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e5e5e5;
  --bg: #f6f6f4;
  --card: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Banner */
.banner { background: #111; color: #fff; }
.banner .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 12px; }
.logo { display: block; }
.logo img { height: 52px; width: auto; display: block; }
.right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.date { font-size: 13px; color: #aaa; }
.langs { display: flex; border: 1px solid #444; border-radius: 4px; overflow: hidden; }
.langs a { padding: 4px 10px; font-size: 13px; font-weight: 600; color: #aaa; text-decoration: none; }
.langs a.on { background: var(--red); color: #fff; }

/* Menu */
.menu { background: var(--red); position: sticky; top: 0; z-index: 5; }
.menu .wrap { display: flex; gap: 2px; overflow-x: auto; }
.menu a { color: #fff; text-decoration: none; padding: 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.menu a.on, .menu a:hover { background: #0002; }

/* Article */
.article { background: var(--card); margin: 24px auto; padding: 28px; border-radius: 6px; }
.tag { display: inline-block; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; text-decoration: none; }
h1 { font-family: Georgia, "PingFang SC", "Noto Serif SC", serif; font-size: 36px; line-height: 1.2; margin: 12px 0 8px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 3px 8px; font-size: 12px; cursor: pointer; color: var(--muted); }
.photo { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; background: #ddd; display: block; }
.ad { margin: 22px 0; text-align: center; }
.ad img { display: block; width: 100%; height: auto; border-radius: 4px; }

/* Post content from the editor */
.content { font-size: 18px; line-height: 1.7; overflow-wrap: break-word; }
.content p { margin: 0 0 16px; }
.content img { max-width: 100%; height: auto; }
.content figure { margin: 16px 0; }
.content figure.image { text-align: center; }
.content figure.image-style-side { float: right; max-width: 50%; margin: 0 0 16px 16px; }
.content figcaption { font-size: 14px; color: var(--muted); text-align: center; }
.content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.content figure.table { overflow-x: auto; }
.content td, .content th { border: 1px solid var(--line); padding: 8px; }
.content blockquote { border-left: 4px solid var(--red); margin: 16px 0; padding: 4px 16px; color: #444; font-style: italic; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.content .text-tiny { font-size: .7em; }
.content .text-small { font-size: .85em; }
.content .text-big { font-size: 1.4em; }
.content .text-huge { font-size: 1.8em; }
.content .marker-yellow { background: #fdfd77; }
.content .marker-green { background: #62f962; }
.content .marker-pink { background: #fc7899; }
.content .marker-blue { background: #72ccfd; }
.content .pen-red { color: #e71313; background: none; }
.content .pen-green { color: #128a00; background: none; }
.content .video { position: relative; padding-bottom: 56.25%; height: 0; margin: 16px 0; }
.content .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 4px; }

/* Lists of posts */
.cat-title { font-size: 32px; margin: 28px 0 20px; padding-bottom: 6px; border-bottom: 3px solid var(--red); display: inline-block; }
.prev h2 { font-size: 18px; border-bottom: 3px solid var(--red); display: inline-block; padding-bottom: 4px; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 40px; }
.card { background: var(--card); border-radius: 6px; overflow: hidden; text-decoration: none; display: block; transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #ddd; }
.card div { padding: 10px 12px 14px; }
.card h3 { font-size: 15px; line-height: 1.35; margin: 6px 0 0; }
.card .tag { font-size: 10px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

footer { background: #111; color: #888; text-align: center; padding: 20px; font-size: 13px; }

@media (max-width: 760px) {
  h1 { font-size: 28px; }
  .article { padding: 18px; }
  .logo img { height: 34px; }
  .content figure.image-style-side { float: none; max-width: 100%; margin: 16px 0; }
}
