:root {
  color-scheme: light;
  --ink: #161f1c;
  --muted: #61746d;
  --line: #dce8e2;
  --paper: rgba(255, 255, 255, .9);
  --soft: #f5faf7;
  --green: #116d57;
  --blue: #245e9b;
  --coral: #c96646;
  --gold: #9b762e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(140deg, rgba(237, 247, 241, .94), rgba(250, 252, 255, .98) 50%, rgba(255, 248, 241, .92));
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  backdrop-filter: blur(18px);
}
.brand, .nav, .user-nav { display: flex; align-items: center; }
.brand { gap: 10px; font-weight: 900; font-size: 18px; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}
.nav { gap: 18px; justify-content: center; color: var(--muted); font-weight: 700; }
.user-nav { gap: 10px; justify-content: flex-end; }
.user-nav form { margin: 0; }
.user-nav button, .nav-cta {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--green);
  font-weight: 800;
}

main, .footer, .messages {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  overflow-x: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px 0 18px;
}
.hero-copy, .hero-panel, .featured-card, .post-card, .side-card, .topic-card, .radar-item, .auth-card, .claim-box, .unlock-box, .comments {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(45, 76, 62, .08);
}
.hero-copy {
  padding: clamp(26px, 5vw, 58px);
  overflow: hidden;
}
.hero-title span { display: block; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-weight: 900;
  letter-spacing: .02em;
}
h1, h2, h3, p { letter-spacing: 0; }
h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .96;
  overflow-wrap: anywhere;
  word-break: break-all;
}
p { overflow-wrap: anywhere; }
.lead {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.85;
  font-size: 18px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}
.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.button.secondary { color: var(--green); background: #eef8f3; }
.button.full { width: 100%; }

.hero-panel { padding: 22px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 900;
}
.panel-header strong { color: var(--coral); }
.signal-list { display: grid; gap: 12px; margin-top: 22px; }
.signal-list div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  padding: 14px;
  border: 1px solid #e3eee8;
  border-radius: 8px;
  background: #fbfffc;
}
.signal-list span { grid-row: span 2; color: var(--blue); font-weight: 900; }
.signal-list p { margin: 4px 0 0; color: var(--muted); line-height: 1.65; }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
  margin-top: 14px;
}
.main-column, .side-column { display: grid; gap: 14px; min-width: 0; }
.section-title { margin: 14px 0 4px; }
.section-title p { margin: 0 0 4px; color: var(--green); font-size: 13px; font-weight: 900; text-transform: uppercase; }
.section-title h2 { margin: 0; font-size: 26px; }
.section-title.compact { margin-top: 0; }
.section-title.compact h2 { font-size: 18px; }

.featured-card { padding: 24px; }
.featured-card h3, .post-card h3, .radar-item h2 {
  margin: 10px 0 8px;
  font-size: 26px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.featured-card p, .post-card p, .source-list p, .topic-card p, .radar-item p, .muted {
  color: var(--muted);
  line-height: 1.75;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(17, 109, 87, .22);
  background: #eff8f3;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}
.badge.soft { background: #f7faf8; color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.meta-row a { color: var(--green); }

.card-list, .post-grid, .map-grid, .radar-list, .timeline { display: grid; gap: 12px; }
.post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.post-card { padding: 18px; }
.post-card-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.side-card { padding: 16px; }
.topic-list, .source-list { display: grid; gap: 10px; }
.topic-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2ece6;
  border-radius: 8px;
  background: #fbfffc;
}

.page-head {
  padding: 42px 0 24px;
  max-width: 900px;
}
.page-head h1 { font-size: clamp(40px, 6vw, 70px); }
.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
}
.search-form input, .auth-card input, .comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  padding: 12px;
  outline: none;
}

.article-shell { margin-top: 20px; }
.article-head {
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #eef8f3, #fbfdff);
  border-radius: 8px;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  margin-top: 18px;
}
.article-body {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: clamp(20px, 4vw, 38px);
  line-height: 1.9;
  font-size: 17px;
}
.article-body p { margin: 0 0 16px; }
.claim-box, .unlock-box {
  padding: 18px;
  margin-bottom: 18px;
}
.claim-box span { color: var(--green); font-weight: 900; }
.claim-box.action { background: #fff9f3; border-color: #f1d8c5; }
.locked-preview {
  max-height: 430px;
  overflow: hidden;
  position: relative;
}
.locked-preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}
.unlock-box { background: #f4faf7; }
.unlock-box.small { padding: 12px; }
.article-side { display: grid; gap: 12px; align-content: start; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span {
  border: 1px solid #dce8e2;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
}

.comments { margin-top: 18px; padding: 22px; }
.comment-form { display: grid; gap: 10px; margin-bottom: 18px; }
.comment {
  border-top: 1px solid #e7f0eb;
  padding: 12px 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.timeline-item time { color: var(--green); font-weight: 900; }
.timeline-item h3 { margin: 0 0 8px; font-size: 22px; }

.topic-card, .radar-item { padding: 20px; }
.map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-card > span { color: var(--coral); font-weight: 900; }
.topic-card h2 { margin: 8px 0; font-size: 28px; }
.radar-item blockquote {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: #f4faf7;
  color: #31413c;
}

.auth-shell {
  min-height: 70vh;
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(460px, 100%);
  padding: 26px;
}
.auth-card h1 { font-size: 40px; }
.auth-card form { display: grid; gap: 12px; margin-top: 18px; }
.auth-card label { display: grid; gap: 6px; color: var(--muted); font-weight: 800; }
.auth-card ul { margin: 6px 0 0; padding-left: 20px; color: var(--coral); }

.messages { display: grid; gap: 8px; margin-top: 8px; }
.message {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef8f3;
  border: 1px solid #cfe7db;
  color: var(--green);
  font-weight: 800;
}
.message.error { background: #fff1ec; border-color: #f2caba; color: #9d3d22; }
.empty {
  padding: 18px;
  border: 1px dashed #cbdcd4;
  border-radius: 8px;
  color: var(--muted);
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  padding: 28px 0 34px;
  font-size: 14px;
}
.footer div { display: flex; gap: 10px; }

@media (max-width: 980px) {
  .site-header, .hero, .section-grid, .article-layout { grid-template-columns: 1fr; }
  .nav { justify-content: flex-start; overflow-x: auto; }
  .post-grid, .map-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  main, .footer, .messages, .site-header { width: calc(100vw - 28px); max-width: calc(100vw - 28px); }
  .hero, .section-grid, .article-layout, .card-list, .post-grid, .map-grid, .radar-list, .timeline { width: 100%; max-width: 100%; }
  .hero-copy, .hero-panel, .featured-card, .post-card, .side-card, .topic-card, .radar-item, .auth-card, .claim-box, .unlock-box, .comments { width: 100%; max-width: 100%; }
  .site-header { gap: 10px; }
  .nav { grid-column: 1 / -1; }
  .user-nav { justify-content: flex-start; }
  h1 { font-size: 28px; line-height: 1.12; }
  .hero-title { max-width: calc(100vw - 76px); }
  .page-head h1, .auth-card h1 { font-size: 32px; }
  .featured-card h3, .post-card h3, .radar-item h2 { font-size: 22px; }
  .lead { font-size: 16px; line-height: 1.75; }
  .hero-copy .lead, .signal-list p, .featured-card p, .post-card p, .source-list p { max-width: calc(100vw - 76px); }
  .hero-copy { padding: 22px; }
  .search-form { grid-template-columns: 1fr; }
  .footer { display: grid; }
}
