:root {
  color-scheme: light;
  --page-bg: #f4f5f7;
  --surface: #fff;
  --ink: #17191d;
  --muted: #68707a;
  --line: #e4e6e9;
  --hero: #626775;
  --accent: #168d18;
  --accent-soft: #eaf7e9;
  --shadow: 0 12px 35px rgba(24, 28, 35, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--page-bg); color: var(--ink); font: 16px Arial, sans-serif; }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { width: min(1200px, calc(100% - 40px)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; }
.brand img { display: block; width: 150px; max-height: 50px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-right: auto; }
.site-nav a { color: #262a30; text-decoration: none; font-size: 13px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; transition: color .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.header-account { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 20px; border-radius: 24px; background: #111; color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.header-account:hover { transform: translateY(-1px); background: #292c31; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 21px; cursor: pointer; }
.page-hero { padding: clamp(42px, 7vw, 82px) 20px; background: var(--hero); color: #fff; text-align: center; }
.page-hero-inner { width: min(900px, 100%); margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #e1e5ed; font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.page-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.035em; }
.page-hero p { max-width: 720px; margin: 18px auto 0; color: rgba(255,255,255,.84); font-size: clamp(16px, 2vw, 19px); }
.page-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: clamp(32px, 5vw, 64px) 0 80px; }
.section-heading { margin: 0 0 18px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.025em; }
.lead { max-width: 820px; color: #4f5660; font-size: 18px; }
.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.info-card, .rule-card, .news-card, .support-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.info-card { padding: 25px; }
.info-card .card-mark { display: grid; width: 46px; height: 46px; place-items: center; margin-bottom: 18px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 22px; font-weight: 800; }
.info-card h3 { margin: 0 0 9px; font-size: 19px; }
.info-card p { margin: 0; color: var(--muted); }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 1px solid #111; border-radius: 12px; background: #111; color: #fff; text-decoration: none; font-weight: 700; transition: transform .18s ease, background .18s ease; }
.button-link:hover { transform: translateY(-1px); background: #292c31; }
.button-link.secondary { background: #fff; color: #202329; border-color: var(--line); }
.button-link.secondary:hover { background: #f8f9fa; }
.rule-list { display: grid; gap: 14px; margin-top: 28px; }
.rule-card { display: grid; grid-template-columns: 48px 1fr; gap: 17px; padding: 22px; }
.rule-number { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.rule-card h3 { margin: 0 0 6px; font-size: 18px; }
.rule-card p { margin: 0; color: var(--muted); }
.notice { margin-top: 26px; padding: 17px 20px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: #fff; color: #4f5660; }
.site-footer { padding: 28px 20px; background: #111; color: #c3c6cb; }
.footer-inner { width: min(1120px, 100%); margin: 0 auto; display: flex; flex-direction:column; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; text-align:center; }
.footer-brand img { display: block; width: auto; height: 40px; max-height: 44px; object-fit: contain; margin:0 auto 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #e4e6e9; text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: #9bdf94; }
.footer-copy { width: 100%; color: #aaa; font-size: 14px; }
/* News feed */
.news-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.news-filter { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: #424850; font: inherit; font-size: 14px; cursor: pointer; }
.news-filter[aria-pressed="true"] { border-color: #202329; background: #202329; color: #fff; }
.news-tools { display: flex; align-items: center; gap: 10px; }
.news-search { width: min(240px, 55vw); min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.news-refresh { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.news-refresh:disabled { opacity: .55; cursor: wait; }
.feed-state { display: flex; align-items: center; gap: 9px; margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.feed-live { display: inline-flex; align-items: center; gap: 7px; color: #227b28; font-weight: 750; }
.feed-live:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #35aa3b; box-shadow: 0 0 0 4px rgba(53,170,59,.12); }
.feed-offline { color: #a04435; }
.news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.news-card { overflow: hidden; padding: 24px; }
.news-card.featured { grid-column: 1 / -1; padding: clamp(24px, 4vw, 38px); background: linear-gradient(135deg, #fff 0%, #f5f8f5 100%); }
.news-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 13px; }
.news-category { padding: 4px 10px; border-radius: 20px; background: var(--accent-soft); color: #28742b; font-size: 12px; font-weight: 750; }
.news-date, .news-time { color: var(--muted); font-size: 13px; }
.news-card h2 { margin: 0 0 9px; font-size: clamp(20px, 3vw, 27px); line-height: 1.25; }
.news-card p { margin: 0; color: #59616b; white-space: pre-wrap; }
.news-empty { grid-column: 1 / -1; padding: 42px 20px; border: 1px dashed #ccd1d7; border-radius: 16px; color: var(--muted); text-align: center; }
/* Support */
.support-layout { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
.support-aside { display: grid; gap: 14px; }
.support-panel { padding: 22px; }
.support-panel h2, .support-panel h3 { margin: 0 0 9px; }
.support-panel p { margin: 0; color: var(--muted); }
.support-point { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eff0f2; }
.support-point:last-child { padding-bottom: 0; border: 0; }
.support-point-mark { color: var(--accent); font-weight: 800; }
.support-chat { display: flex; min-height: 650px; flex-direction: column; overflow: hidden; padding: 0; }
.support-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.support-chat-head h2 { margin: 0; font-size: 18px; }
.chat-presence { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.chat-presence:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #54aa50; }
.chat-messages { display: flex; flex: 1; min-height: 310px; max-height: 470px; flex-direction: column; gap: 12px; overflow-y: auto; padding: 22px; background: #fafbfc; }
.chat-empty { width: min(460px, 100%); margin: auto; padding: 24px 18px; color: var(--muted); text-align: center; }
.chat-empty strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 18px; }
.chat-message { display: flex; gap: 10px; align-items: flex-end; max-width: min(82%, 620px); }
.chat-message.own { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #e9edf1; color: #333b45; font-size: 12px; font-weight: 800; }
.chat-message.staff .chat-avatar { background: var(--accent-soft); color: var(--accent); }
.chat-bubble { padding: 11px 14px; border: 1px solid #e7e9ec; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 3px 10px rgba(20,25,30,.035); }
.chat-message.own .chat-bubble { border-color: #d9ecd6; border-radius: 16px 16px 4px 16px; background: #edf7ec; }
.chat-message.staff .chat-bubble { border-color: #dbead9; }
.chat-sender { margin-bottom: 4px; color: #69717a; font-size: 12px; font-weight: 700; }
.chat-message-text { color: #24282e; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message-time { margin-top: 5px; color: #828992; font-size: 11px; text-align: right; }
.chat-banner { display: none; margin: 14px 20px 0; padding: 12px 14px; border-radius: 11px; background: #f2f3f5; color: #515861; font-size: 14px; }
.chat-banner.visible { display: block; }
.chat-banner.error { background: #fff1ef; color: #9a382b; }
.chat-form { padding: 17px 20px 20px; border-top: 1px solid var(--line); background: #fff; }
.chat-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.chat-field, .chat-textarea { width: 100%; min-width: 0; border: 1px solid #dfe2e6; border-radius: 11px; background: #fff; color: var(--ink); font: inherit; outline: none; }
.chat-field { min-height: 42px; padding: 0 12px; }
.chat-textarea { min-height: 82px; max-height: 180px; resize: vertical; padding: 11px 13px; }
.chat-field:focus, .chat-textarea:focus, .news-search:focus { border-color: #75b771; box-shadow: 0 0 0 3px rgba(66,158,60,.12); }
.chat-form-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.chat-help, .chat-count { color: var(--muted); font-size: 12px; }
.chat-send { min-height: 42px; padding: 0 18px; border: 0; border-radius: 11px; background: #111; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.chat-send:hover { background: #2a2d32; }
.chat-send:disabled { opacity: .55; cursor: wait; }
@media (max-width: 820px) {
  .header-inner { width: min(100% - 28px, 700px); min-height: 68px; flex-wrap: wrap; gap: 12px; padding: 9px 0; }
  .brand img { width: 130px; max-height: 43px; }
  .nav-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .header-account { min-height: 40px; padding: 0 14px; font-size: 13px; }
  .site-nav { display: none; order: 4; width: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 5px 0; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; border-top: 1px solid #f0f1f2; }
  .content-grid { grid-template-columns: 1fr; }
  .support-layout { grid-template-columns: 1fr; }
  .support-chat { min-height: 600px; }
}
@media (max-width: 620px) {
  .header-inner { width: calc(100% - 24px); gap: 9px; }
  .brand img { width: 112px; }
  .header-account { min-height: 38px; padding: 0 11px; font-size: 12px; }
  .page-main { width: calc(100% - 26px); padding-bottom: 54px; }
  .news-list { grid-template-columns: 1fr; }
  .news-card.featured { grid-column: auto; }
  .news-toolbar { align-items: stretch; }
  .news-tools { justify-content: space-between; }
  .news-search { flex: 1; width: auto; }
  .rule-card { grid-template-columns: 40px 1fr; gap: 12px; padding: 17px; }
  .rule-number { width: 36px; height: 36px; }
  .support-chat { min-height: 560px; }
  .chat-messages { min-height: 280px; padding: 15px 12px; }
  .chat-message { max-width: 94%; }
  .chat-identity { grid-template-columns: 1fr; }
  .chat-form { padding: 14px 12px; }
  .chat-help { max-width: 58%; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; gap: 10px 16px; }
}


/* Shared header follows the original SVTech home page. */
body { font: 16px Arial, sans-serif; background: #f5f5f5; }
.site-header { position: relative; display:flex; justify-content:flex-start; align-items:center; gap:0; flex-wrap:wrap; padding:15px 30px; background:#fff; border-bottom:1px solid #ccc; backdrop-filter:none; }
.brand { flex:0 0 auto; }
.brand img { width:auto; height:50px; max-height:none; }

.social-icons { display:flex; align-items:center; margin-left:20px; }
.social-icons a { display:inline-flex; margin:0 8px; }
.social-icons img { width:30px; height:30px; object-fit:contain; }
.site-nav { margin:0 auto 0 20px; gap:0; }
.site-nav a { margin:0 15px; color:#111; font-size:16px; font-weight:bold; letter-spacing:0; text-transform:uppercase; }
.site-nav a:hover,.site-nav a[aria-current="page"] { color:#555; }
.cta-buttons { position:relative; display:flex; align-items:center; gap:10px; margin-left:auto; }
.cta-button { position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden; padding:10px 40px; border-radius:20px; background:#000; color:#fff; text-decoration:none; font-weight:bold; box-shadow:0 4px 10px rgba(0,0,0,.2); transition:all .3s ease; cursor:pointer; user-select:none; }
.cta-button:hover { transform:translateY(-2px); background:#222; }
.cta-button img { width:20px; height:20px; border-radius:50%; margin-right:8px; object-fit:cover; }
.cta-button:not(.logged-in)::after { z-index:1; content:'Войти'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; transform:translateY(100%); opacity:0; background:#000; color:#fff; transition:all .3s ease; }
.cta-button:not(.logged-in):hover::after { transform:translateY(0); opacity:1; }
.cta-button:not(.logged-in):hover>* { opacity:0; }

.profile-box { position:absolute; top:50px; right:0; z-index:10000; display:flex; align-items:center; gap:5px; padding:10px; border-radius:12px; background:#fff; box-shadow:0 4px 15px rgba(0,0,0,.2); opacity:0; visibility:hidden; pointer-events:none; transform:translateY(-10px); transition:opacity .3s ease,transform .3s ease; }
.profile-box.visible { opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0); }
.nav-toggle { display:none; }
.page-hero { padding:40px; background:#666b7a; }
.page-hero h1 { font-size:50px; font-weight:700; line-height:1.15; letter-spacing:0; }
.page-hero p { max-width:800px; margin:20px auto 0; font-size:24px; }
.eyebrow { margin-bottom:12px; letter-spacing:0; text-transform:none; }
.info-card,.rule-card,.news-card,.support-panel { border-radius:12px; box-shadow:0 6px 14px rgba(0,0,0,.15); }
.info-card { background:linear-gradient(135deg,#eae6ff,#f4f4f4); border:0; padding:30px; transition:transform .3s ease,box-shadow .3s ease; }
.info-card:hover { transform:translateY(-4px); box-shadow:0 15px 30px rgba(0,0,0,.2); }
.info-card h3 { font-size:24px; }
.info-card p { color:#333; }
.info-card .card-mark,.rule-number,.news-category { background:#f1f1f1; color:#333; }
.chat-send,.button-link,.news-filter[aria-pressed="true"] { background:#111; }
@media(max-width:768px) {
 .site-header { flex-direction:column; align-items:center; text-align:center; padding:15px 20px; }
 .brand { order:0; }
 .brand img { height:50px; margin-bottom:10px; }
 .social-icons { order:1; display:flex; justify-content:center; width:100%; margin:10px 0 0; }
 .site-nav { order:2; display:flex !important; flex-direction:row; justify-content:center; flex-wrap:wrap; width:100%; margin:10px 0; }
 .site-nav a { margin:5px 10px; padding:0; border:0; font-size:14px; }
 .nav-toggle { display:none !important; }
 .cta-buttons { order:3; width:100%; justify-content:center; margin:10px 0 0; }
 .cta-button { width:100%; max-width:300px; padding:10px 20px; }
 .page-hero { padding:40px 20px; }
 .page-hero h1 { font-size:32px; line-height:1.2; }
 .page-hero p { margin-top:15px; font-size:18px; }
}

@media (min-width:1024px) and (min-aspect-ratio:16/9) { .page-hero { padding:30px 40px; } .page-hero h1 { font-size:42px; } .page-hero p { margin-top:15px; font-size:20px; } }
