:root {
  --ink: #111820;
  --muted: #51606b;
  --link: #496d7d;
  --line: #8cacbb;
  --panel: #dee7ec;
  --panel-soft: #eef3f8;
  --paper: #ffffff;
  --page: #f6f9fb;
  --accent: #436976;
  --shadow: 0 18px 45px rgba(31, 52, 65, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0, var(--page) 320px, #ffffff 100%);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

p,
ul {
  margin-top: 0;
}

.site {
  width: min(100% - 32px, 1060px);
  margin: 0 auto;
  padding: 18px 0 40px;
}

.masthead {
  display: grid;
  margin-bottom: 18px;
}

.titlebar {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #000;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, var(--shadow);
}

.brand {
  color: #000;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 0.95;
  text-decoration: none;
}

.subtitle {
  margin: 0 0 2px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.layout {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr) minmax(150px, 180px);
  gap: 20px;
  align-items: start;
}

.sidebar,
.aside,
.content {
  min-width: 0;
}

.side-section {
  margin-bottom: 22px;
}

.side-section h2 {
  margin: 0 0 8px;
  padding: 10px 0 5px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.menu-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-list a {
  display: block;
  padding: 4px 6px;
  border-radius: 4px;
  color: #000;
  text-decoration: none;
}

.menu-list a:hover {
  background: var(--panel);
}

.intro {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(140, 172, 187, 0.5);
  border-radius: 8px;
  background: var(--panel-soft);
}

.intro h1 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.intro p {
  margin-bottom: 0;
  color: var(--muted);
}

.news-list {
  display: grid;
  gap: 14px;
}

.entry {
  overflow: hidden;
  border: 1px solid rgba(140, 172, 187, 0.65);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 25px rgba(31, 52, 65, 0.06);
}

.entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(140, 172, 187, 0.5);
  color: #000;
  background: var(--panel);
}

.entry h1,
.entry h2 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.entry h1 {
  font-size: 1.15rem;
}

.entry h1 a,
.entry h2 a {
  color: #000;
  text-decoration: none;
}

.entry time {
  flex: 0 0 auto;
  color: var(--link);
  font-size: 0.92rem;
  font-weight: 700;
}

.entry-body {
  padding: 14px 10px 18px;
}

.entry-body p:last-child {
  margin-bottom: 0;
}

.entry-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 14px 0;
  border-radius: 6px;
}

.entry-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.entry-meta a {
  color: var(--muted);
}

.language-switch {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  font-size: 0.84rem;
}

.tag-list a {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid rgba(140, 172, 187, 0.55);
  border-radius: 4px;
  background: var(--panel-soft);
  color: var(--muted);
  text-decoration: none;
}

.tag-list a:hover {
  background: var(--panel);
  color: var(--ink);
}

.post-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(140, 172, 187, 0.5);
  font-size: 0.9rem;
}

.post-pager-next {
  margin-left: auto;
  text-align: right;
}

.ad-card {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.ad-card h2 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.ad-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

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

  .sidebar {
    order: 1;
  }

  .content {
    order: 2;
  }

  .aside {
    order: 3;
  }

  .sidebar,
  .aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .side-section,
  .ad-card {
    margin-bottom: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .site {
    width: min(100% - 20px, 1060px);
    padding-top: 10px;
  }

  .titlebar,
  .entry-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .subtitle {
    text-align: left;
  }

  .sidebar,
  .aside {
    grid-template-columns: 1fr;
  }

  .menu-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
