:root {
  --green: #16a34a; --green-dark: #15803d; --green-soft: #dcfce7;
  --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #fff;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 34px; }
.center { text-align: center; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); }
.empty a { color: var(--green); font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 999px;
       font-weight: 600; font-size: 14px; border: 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-light { background: var(--green-soft); color: var(--green-dark); }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--green); color: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn.big { min-height: 48px; font-size: 16px; padding: 0 24px; }
.btn.wide { width: 100%; }

/* Header */
.site-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; }
.logo img { border-radius: 9px; }
.brand-x { color: var(--green); font-weight: 900; }
.logo.light .brand-x { color: #4ade80; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--green); display: grid; place-items: center; color: #fff; flex: none; }
.menu { display: flex; gap: 18px; font-weight: 500; color: #334155; font-size: 15px; }
.menu a:hover, .menu a.on { color: var(--green); }
.nav-search { flex: 1; max-width: 300px; margin-left: auto; position: relative; }
.nav-search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px 0 38px; font: inherit; font-size: 14px; background: var(--bg); }
.nav-search svg { position: absolute; left: 13px; top: 12px; }
.menu-btn { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }

/* Ads */
.ad-box { position: relative; text-align: center; overflow: hidden; }
.ad-box img { display: block; margin: 0 auto; border-radius: 10px; }
.ad-label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin-bottom: 4px; }
.ad-top, .ad-hero, .ad-foot { margin: 12px auto; }
.ad-feed { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; place-items: center; }
.ad-text { display: block; padding: 20px; font-weight: 700; color: var(--green-dark); }

/* Hero */
.hero { background: linear-gradient(135deg, #052e16 0%, #14532d 55%, #166534 100%); color: #fff; padding: 48px 0 54px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.12; margin: 0 0 12px; max-width: 760px; letter-spacing: -0.02em; }
.hero p { color: #bbf7d0; font-size: 17px; margin: 0 0 24px; max-width: 640px; }
.paste { background: #fff; border-radius: 16px; padding: 8px; display: flex; gap: 8px; max-width: 680px; box-shadow: 0 20px 40px rgba(0,0,0,.25); }
.paste input { flex: 1; border: 0; font: inherit; font-size: 15px; padding: 0 12px; outline: none; color: var(--ink); min-width: 0; }
.paste .btn { min-height: 46px; border-radius: 12px; }
.stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.stats b { display: block; font-size: 24px; }
.stats span { color: #86efac; font-size: 13px; }

/* Layout */
.page-pad { padding-top: 26px; padding-bottom: 48px; }
.narrow { max-width: 820px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
section { margin-bottom: 32px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.sec-head h2 { margin: 0; font-size: 21px; letter-spacing: -0.01em; }
.sec-head a { color: var(--green); font-weight: 600; font-size: 14px; white-space: nowrap; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -0.02em; line-height: 1.2; }
.page-head p { margin: 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a:hover { color: var(--green); }
.crumbs .sep { color: #cbd5e1; }
.notice { background: #fef3c7; border-radius: 10px; padding: 10px 14px; }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cats.big { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.cat:hover { border-color: var(--green); }
.cat i { font-style: normal; font-size: 20px; }
.cat small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

/* Cards */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.g { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.g:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .06); }
.g.pinned { border-color: #fcd34d; background: linear-gradient(#fffbeb, #fff 60%); }
.pin { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 3px 8px; text-transform: uppercase; }
.g-top { display: flex; gap: 12px; align-items: center; }
.avatar { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; flex: none; object-fit: cover; background: #e2e8f0; }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.g h3 { font-size: 15px; margin: 0 0 4px; line-height: 1.3; padding-right: 56px; overflow-wrap: anywhere; }
.g h3 a:hover { color: var(--green-dark); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11.5px; color: #475569; background: #f1f5f9; border-radius: 999px; padding: 3px 9px; font-weight: 500; }
a.tag:hover { background: var(--green-soft); color: var(--green-dark); }
.tag.ch { color: #1d4ed8; background: #dbeafe; }
.tag.gr { color: var(--green-dark); background: var(--green-soft); }
.g p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.g-foot small { color: var(--muted); font-size: 12px; }
.join { min-height: 36px; padding: 0 16px; }

/* Article cards */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .06); }
.thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.thumb.ph { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; text-align: center; padding: 14px; background: linear-gradient(135deg, #166534, #22c55e); }
.post .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.post small { color: var(--green-dark); font-weight: 600; font-size: 12px; }
.post-title { font-size: 16px; line-height: 1.35; }
.post-ex { color: var(--muted); font-size: 13.5px; }

/* Sidebar */
.side .box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.box-h { margin: 0 0 12px; font-size: 15px; }
.list a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.list a:hover { color: var(--green-dark); }
.list a span { color: var(--muted); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.chips a:hover { border-color: var(--green); }
.cta { background: var(--green-soft) !important; border-color: #bbf7d0 !important; }
.cta p { font-size: 13.5px; color: #166534; margin: 0 0 12px; }
.sticky { position: sticky; top: 80px; }

/* FAQ and long text */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--muted); margin: 10px 0 0; font-size: 14px; }
.prose { font-size: 16.5px; line-height: 1.75; color: #1e293b; overflow-wrap: anywhere; }
.prose h2 { font-size: 23px; margin: 28px 0 10px; line-height: 1.3; }
.prose h3 { font-size: 19px; margin: 22px 0 8px; }
.prose a { color: var(--green-dark); text-decoration: underline; }
.prose img { border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px; }
.prose blockquote { border-left: 4px solid var(--green); margin: 16px 0; padding: 4px 16px; color: #334155; background: #fff; }
.seo-text { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; font-size: 15px; }

/* Group page */
.detail { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.detail-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.detail h1 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }
.h1-sub { display: block; font-size: 15px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.detail h2 { font-size: 19px; margin: 26px 0 10px; }
.join-big { width: 100%; min-height: 54px; font-size: 17px; border-radius: 14px; margin: 6px 0 4px; }
.desc { white-space: normal; color: #334155; }
.info { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.info th, .info td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #f1f5f9; }
.info th { color: var(--muted); font-weight: 500; width: 40%; }
.info a { color: var(--green-dark); }
.steps { padding-left: 20px; color: #334155; }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }

/* Article */
.article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.article h1 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.2; letter-spacing: -0.02em; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.meta a { color: var(--green-dark); }
.feature { width: 100%; border-radius: 12px; margin-bottom: 18px; aspect-ratio: 16/9; object-fit: cover; }
.group-table h2 { font-size: 22px; margin: 30px 0 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.group-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 460px; }
.group-table th { background: #f8fafc; text-align: left; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.group-table td { padding: 10px 12px; border-top: 1px solid #f1f5f9; vertical-align: middle; }
.gt-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.gt-name img { border-radius: 50%; width: 32px; height: 32px; object-fit: cover; }
.gt-name a:hover { color: var(--green-dark); }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; }
.form-card label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.form-card input, .form-card select, .form-card textarea, .search-big input { font: inherit; font-weight: 400; font-size: 15px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; width: 100%; background: #fff; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { outline: 2px solid #86efac; border-color: var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -5000px; }
.preview { display: flex; gap: 12px; align-items: center; background: var(--green-soft); border-radius: 12px; padding: 10px; }
.preview img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #fff; }
.preview small { display: block; color: #166534; }
.alert { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-weight: 500; }
.alert.ok { background: var(--green-soft); color: #14532d; }
.alert.err { background: #fee2e2; color: #991b1b; }
.alert a { text-decoration: underline; }
.search-big { display: flex; gap: 8px; margin-top: 14px; max-width: 560px; }
.center .search-big { margin: 18px auto; }

/* Pager */
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0; justify-content: center; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; }
.pager span.on { background: var(--green); color: #fff; border-color: var(--green); }
.pager a:hover { border-color: var(--green); }

/* Footer */
.site-foot { background: #0b1220; color: #cbd5e1; padding: 40px 0 24px; margin-top: 20px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.foot-h { color: #fff; margin: 0 0 12px; font-size: 14px; }
.site-foot a { display: block; padding: 4px 0; font-size: 14px; color: #94a3b8; }
.site-foot a:hover { color: #fff; }
.logo.light { color: #fff; font-size: 19px; padding: 0; }
.foot-text { color: #94a3b8; font-size: 14px; max-width: 340px; }
.copy { border-top: 1px solid #1e293b; margin-top: 28px; padding-top: 18px; font-size: 13px; color: #64748b; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; }

@media (max-width: 980px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .menu { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); padding: 8px 16px; }
  .menu.open { display: flex; }
  .menu a { padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
  .menu-btn { display: block; }
  .foot { grid-template-columns: 1fr 1fr; }
  .sticky { position: static; }
}
@media (max-width: 600px) {
  .nav { gap: 10px; }
  .nav-search { display: none; }
  .nav .btn-green { padding: 0 12px; font-size: 13px; }
  .paste { flex-direction: column; }
  .paste input { min-height: 44px; }
  .stats { gap: 18px; }
  .two { grid-template-columns: 1fr; }
  .detail, .article { padding: 16px; }
  .detail-head { flex-direction: column; align-items: flex-start; }
  .group-table table { min-width: 0; }
  .group-table th:nth-child(3), .group-table td:nth-child(3) { display: none; }
  .group-table th, .group-table td { padding: 8px; }
  .foot { grid-template-columns: 1fr; }
}
