/* snent.ru — the look of the SNENT sites (as city.snent.ru): dark, GitHub-like greys, gold accents */
:root {
  --bg: #0d1117; --card: #161b22; --row: #21262d; --edge: #30363d; --text: #e6edf3; --soft: #c9d1d9; --muted: #8b949e;
  --accent: #2ea043; --blue: #1f6feb; --link: #58a6ff; --gold: #ffd66e; --good: #7ee787; --bad: #ff7b72;
  --violet: #8957e5; --teal: #2bb3a6;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
.hidden { display: none !important; }

/* ── the top bar ── */
header.top { display: flex; align-items: center; gap: 18px; padding: 0 24px; height: 60px; border-bottom: 1px solid var(--edge); background: rgba(13, 17, 23, .92); position: sticky; top: 0; z-index: 3; backdrop-filter: blur(6px); }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: .3px; white-space: nowrap; color: var(--text); text-decoration: none; }
.logo .mark { width: 26px; height: 26px; flex: none; }
.logo .word { color: var(--text); }
nav.main { display: flex; gap: 4px; flex: 1; overflow-x: auto; height: 100%; scrollbar-width: none; }
nav.main a { display: flex; align-items: center; padding: 0 14px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
nav.main a:hover { color: var(--text); }
nav.main a.on { color: var(--text); border-bottom-color: var(--gold); }
.chip { display: flex; align-items: center; gap: 8px; color: var(--text); background: none; border: 0; border-radius: 99px; padding: 4px 4px 4px 12px; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.chip:hover, .chip[aria-expanded="true"] { background: var(--row); }
.chip .caret { color: var(--muted); font-size: 11px; }
.account { position: relative; flex: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--card); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.5); padding: 6px; z-index: 5; }
.menu .me { padding: 10px 12px 12px; border-bottom: 1px solid var(--edge); margin-bottom: 6px; }
.menu .me b { display: block; }
.menu .me span { color: var(--muted); font-size: 13px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--row); }
.menu .ico { width: 18px; text-align: center; color: var(--muted); }
.menu .sep { height: 1px; background: var(--edge); margin: 6px 0; }
.menu .out, .menu .out .ico { color: var(--bad); }
.ava { font-style: normal; width: 32px; height: 32px; border-radius: 50%; background: var(--blue) center / cover no-repeat; color: #fff; display: grid; place-items: center; font-weight: 800; text-transform: uppercase; flex: none; overflow: hidden; }
.ava.big { width: 72px; height: 72px; font-size: 30px; }
.ava.pic { color: transparent; }
@media (max-width: 640px) {
  header.top { gap: 10px; padding: 0 12px; }
  .logo .word { display: none; }
  .chip #who, .chip .caret { display: none; }
  .chip { padding: 4px; }
  nav.main a { padding: 0 9px; }
}

/* ── the page ── */
main { max-width: 1080px; margin: 0 auto; padding: 28px 16px 64px; }
main.narrow { max-width: 760px; }
h1.page { font-size: 28px; margin: 0 0 4px; }
.lead { color: var(--muted); margin: 0 0 24px; }
h2 { font-size: 18px; margin: 0 0 14px; }
h2.section { font-size: 24px; margin: 8px 0 16px; }
.card { background: var(--card); border: 1px solid var(--edge); border-radius: 12px; padding: 20px 22px; min-width: 0; }
.stack { display: grid; gap: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }
.small { color: var(--muted); font-size: 14px; }
.msg { color: var(--bad); font-size: 14px; min-height: 18px; }
.msg.ok { color: var(--good); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mt { margin-top: 18px; }
.more { display: inline-block; margin-bottom: 32px; font-weight: 600; text-decoration: none; }
footer { text-align: center; color: var(--muted); font-size: 14px; padding: 20px 16px 32px; border-top: 1px solid var(--edge); }
footer a { color: var(--muted); }
footer .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }

/* ── buttons and fields ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid var(--edge); background: var(--row); color: var(--text); white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.big { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 18px; padding: 14px 28px; box-shadow: 0 8px 30px rgba(46, 160, 67, .3); }
.btn.ghost { background: none; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn.off { opacity: .5; pointer-events: none; }
.field { display: grid; gap: 6px; font-weight: 600; margin-bottom: 14px; }
.field span { color: var(--muted); font-weight: 400; font-size: 14px; }
input[type=text], input[type=password], input[type=email], textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 400; }
input:focus, textarea:focus { outline: 2px solid rgba(31, 111, 235, .6); outline-offset: 0; border-color: var(--blue); }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--soft); }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--edge); border-radius: 10px; flex-wrap: wrap; }
.seg button { background: none; border: 0; border-radius: 7px; padding: 7px 16px; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--row); color: var(--text); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; background: var(--bg); border: 1px solid var(--edge); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }

/* ── lists ── */
.stat { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--edge); }
.stat:last-child { border-bottom: 0; }
.stat > span:first-child { color: var(--muted); }
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--edge); min-width: 0; }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--row); color: var(--muted); vertical-align: 2px; }
.tag.gold { color: var(--gold); }
.tag.good { color: var(--good); }
.tag.bad { color: var(--bad); }

/* ── the news ── */
.news-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 20px; }
.news-list { display: grid; gap: 14px; max-width: 760px; }
.news-card { background: var(--card); border: 1px solid var(--edge); border-radius: 12px; padding: 16px 20px; min-width: 0; }
.news-card .when { color: var(--muted); font-size: 13px; }
.news-card b { display: block; font-size: 17px; margin: 2px 0 6px; }
.news-card p { margin: 0; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.news-cards .news-card p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ── the home page ── */
.hero { position: relative; overflow: hidden; padding: 76px 24px 70px; text-align: center;
  background: radial-gradient(900px 380px at 30% -10%, rgba(31, 111, 235, .35), transparent 70%), radial-gradient(700px 320px at 75% 0%, rgba(137, 87, 229, .22), transparent 70%), linear-gradient(180deg, #0f1722, var(--bg)); }
.hero h1 { font-size: clamp(34px, 6vw, 62px); line-height: 1.07; margin: 0 0 16px; }
.hero h1 span { color: var(--gold); }
.hero p.lead { max-width: 720px; margin: 0 auto 30px; color: var(--soft); font-size: 19px; }
.hero .row { justify-content: center; }
.hero .grid { position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(139, 148, 158, .35) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask: linear-gradient(180deg, transparent, #000 40%, transparent); mask: linear-gradient(180deg, transparent, #000 40%, transparent); }
.hero > *:not(.grid) { position: relative; }
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 36px; }
@media (max-width: 920px) { .products { grid-template-columns: 1fr; } }
.product { position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--edge); border-radius: 14px; padding: 22px; overflow: hidden; }
.product::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c, var(--gold)); }
.product .head { display: flex; align-items: center; gap: 12px; }
.product .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); flex: none; }
.product .icon svg { width: 24px; height: 24px; }
.product h3 { margin: 0; font-size: 20px; }
.product h3 small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.product p { margin: 0; color: var(--soft); }
.product ul { margin: 0; padding: 0 0 0 18px; color: var(--soft); }
.product ul li::marker { color: var(--c); }
.product .row { margin-top: auto; padding-top: 6px; }
.product.trade { --c: #58a6ff; }
.product.city { --c: var(--gold); }
.product.messenger { --c: #a78bfa; }
.product.vpn { --c: #3fb950; }
.product.invest { --c: #f0883e; }
.product.ide { --c: #7c8cff; }
.caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 24px; padding: 0; margin: 0; list-style: none; }
.caps li { position: relative; padding-left: 22px; color: var(--soft); }
.caps li::before { content: "◆"; position: absolute; left: 0; color: var(--gold); font-size: 12px; top: 4px; }
.band { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; margin-bottom: 36px; }
@media (max-width: 820px) { .band { grid-template-columns: 1fr; } }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.contact { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--edge); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--text); min-width: 0; }
a.contact:hover { border-color: var(--muted); }
.contact .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--row); color: var(--gold); flex: none; font-size: 18px; }
.contact b { display: block; }
.contact span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

/* ── the sign-in, the consent ── */
.gate { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 40px 16px;
  background: radial-gradient(1000px 420px at 50% 0%, rgba(31, 111, 235, .35), transparent 70%), linear-gradient(180deg, #0f1722, var(--bg)); }
.gate .card { max-width: 440px; width: 100%; padding: 32px 30px; }
.gate h1 { font-size: 30px; margin: 0 0 6px; text-align: center; }
.gate h1 span { color: var(--gold); }
.gate .lead .svc { color: var(--gold); }
.gate .lead { text-align: center; }
.gate .seg { display: flex; margin-bottom: 20px; }
.gate .seg button { flex: 1; }
.gate .btn.primary { width: 100%; padding: 12px; font-size: 17px; }
.app-ask { text-align: center; }
.app-ask .who { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 18px; }
.app-ask .who .ava { width: 44px; height: 44px; }
.app-ask .arrow { color: var(--muted); }
.app-ask ul { text-align: left; color: var(--soft); padding-left: 20px; }

/* ── tables of the admins ── */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--edge); }
.table td { padding: 10px; border-bottom: 1px solid var(--edge); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.scroll { overflow-x: auto; }
