/*
Theme Name: GEO Minimal
Description: Server-rendered article theme for the GEO publishing MVP.
Version: 0.4.3
*/

:root {
  color-scheme: light;
  --page: #f3f5f7;
  --surface: #ffffff;
  --ink: #202a38;
  --muted: #6b7480;
  --line: #e3e7ec;
  --accent: #2676d9;
  --accent-strong: #175fae;
  --accent-soft: #edf5ff;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
}

.site-main,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header-inner {
  display: flex;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 68px;
  margin-inline: auto;
}

.site-title {
  color: var(--accent);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.site-description {
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-nav-link {
  margin-left: auto;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.site-main {
  padding: 22px 0 56px;
}

.page-intro,
.article-list,
.article,
.empty-state {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: var(--surface);
}

.page-intro {
  margin-bottom: 16px;
  padding: 26px 30px 28px;
  border-top: 3px solid var(--accent);
}

.page-intro p:last-child {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
}

.section-label {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.article-list {
  overflow: hidden;
}

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

.content-column { min-width: 0; }

.section-title {
  margin: 0;
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
}

.section-title::before {
  display: inline-block;
  width: 4px;
  height: 20px;
  margin-right: 12px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: -3px;
  content: "";
}

.post-card {
  padding: 21px 24px 22px;
  border-bottom: 1px solid var(--line);
}

.post-card:last-child { border-bottom: 0; }

.post-card h3 {
  margin: 3px 0 7px;
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.45;
}

.post-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card h3 a:hover,
.post-card h3 a:focus-visible { color: var(--accent); }

.post-excerpt {
  color: #4d5867;
  font-size: 15px;
  line-height: 1.7;
}

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

.read-more {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.content-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.sidebar-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sidebar-section h2 {
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.sidebar-summary {
  padding: 18px;
  border-top: 3px solid var(--accent);
}

.sidebar-summary h2 {
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.sidebar-summary p {
  margin: 10px 0 0;
  color: #4d5867;
  font-size: 14px;
  line-height: 1.75;
}

.sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-list li {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-list li:last-child { border-bottom: 0; }

.sidebar-list a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sidebar-list a:hover,
.sidebar-list a:focus-visible { color: var(--accent); }

.sidebar-list time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.35;
}

.breadcrumb {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a { color: var(--accent-strong); }
.breadcrumb span { margin-left: 8px; }

.article {
  padding: clamp(26px, 4vw, 46px);
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-header .post-meta { margin: 14px 0 0; }

.article-header h1 {
  font-size: clamp(24px, 2.1vw, 26px);
  line-height: 1.5;
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
}

.article-content h2 {
  margin: 42px 0 18px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}

.article-content h3 { margin-top: 32px; font-size: 18px; line-height: 1.5; }
.article-content p { margin: 0 0 1.35em; }
.article-content ul,
.article-content ol { padding-left: 1.4em; }
.article-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.article-contact {
  margin-top: 42px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.article-contact h2 { margin: 0 0 8px; font-size: 20px; }
.article-contact p { margin: 0 0 8px; }
.article-contact a { font-size: 24px; font-weight: 800; text-decoration: none; }

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

.post-meta,
.site-footer {
  color: var(--muted);
  font-size: 14px;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.post-navigation p {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.navigation.pagination { margin-top: 24px; }
.nav-links { display: flex; gap: 8px; }
.page-numbers {
  min-width: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  text-align: center;
  text-decoration: none;
}
.page-numbers.current { border-color: var(--accent); background: var(--accent); color: #fff; }

.empty-state { padding: 48px; text-align: center; color: var(--muted); }

.site-footer {
  padding: 0 0 36px;
}

.geo-table-wrap {
  margin: 22px 0;
  overflow-x: auto;
}

.geo-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
}

.geo-comparison-table th,
.geo-comparison-table td {
  min-width: 140px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.geo-comparison-table th {
  background: var(--accent-soft);
}

:focus-visible {
  outline: 3px solid rgb(38 118 217 / .3);
  outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #111820;
    --surface: #18212b;
    --ink: #eef3f8;
    --muted: #a9b3bf;
    --line: #2d3946;
    --accent: #6aa9f2;
    --accent-strong: #8bbcf4;
    --accent-soft: #1d3045;
  }

  .page-intro,
  .article-list,
  .article,
  .sidebar-section,
  .empty-state { border-color: var(--line); }
  .post-excerpt { color: #c5cdd6; }
  .sidebar-summary p { color: #c5cdd6; }
}

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .content-sidebar { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-main,
  .site-footer,
  .site-header-inner { width: min(100% - 24px, 1180px); }
  .site-header-inner { min-height: 64px; }
  .site-description { display: none; }
  .site-nav-link { font-size: 14px; }
  .site-main { padding-top: 16px; }
  .page-intro { margin-bottom: 12px; padding: 20px; }
  .page-intro,
  .article { padding: 24px 20px; }
  .section-title { padding: 18px 20px; }
  .post-card { padding: 22px 20px 24px; }
  .article-header { margin-bottom: 28px; }
  .article-content h2 { font-size: 20px; }
  .post-navigation { grid-template-columns: 1fr; }
  .content-sidebar { grid-template-columns: 1fr; }
}
