/* Общие стили поддомена cybersecurity: те же токены и блоки, что у xelopat.ru (assets/site.css),
   но самодостаточно, потому что у поддомена свой корень и до /assets основного сайта он не достаёт */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root{
  --bg:#151518;
  --panel:#1e1e25;
  --panel-2:#191920;
  --text:#efeff1;
  --text-2:#a4a8bb;
  --muted:#868899;
  --line:#333340;
  --line-2:#2a2a34;
  --accent:#f9c940;
  --green:#61d1ad;
  --violet:#9d8ff0;
  --danger:#ff8f8f;
  --shadow:0 18px 40px rgba(0,0,0,.24);
  --header-h:60px;
  --sans:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --mono:'Space Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
}
a{ color:var(--green); }

/* ===== Шапка ===== */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(21,21,24,.94);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.site-header .wrap{
  width:min(1280px, calc(100% - 32px));
  margin:0 auto;
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  text-decoration:none;
  font-family:var(--mono);
  font-size:14px;
}
.brand-mark{
  width:30px;
  height:30px;
  border-radius:6px;
  border:1px solid var(--line);
  background:#151518;
  overflow:hidden;
  display:flex;
  flex:0 0 auto;
}
.brand-mark img{ width:100%; height:100%; object-fit:cover; display:block; }
.brand-sub{ color:var(--green); }

.nav{ display:flex; align-items:center; gap:18px; }
.nav-link{
  position:relative;
  color:var(--muted);
  font-weight:500;
  font-size:13px;
  line-height:20px;
  text-decoration:none;
  white-space:nowrap;
  transition:color .18s ease;
}
.nav-link:hover, .nav-link.active{ color:var(--accent); }
.nav-link.active::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-6px;
  height:2px;
  background:var(--accent);
}
.nav-link--out{
  border:1px solid var(--line);
  border-radius:8px;
  padding:5px 12px;
  background:var(--panel);
  color:var(--text);
}
.nav-link--out:hover{ background:#252532; }

/* Выпадающие каталоги шапки */
.dd{ position:relative; }
.nav-dd{
  appearance:none; border:none; background:transparent; padding:0; cursor:pointer; font-family:inherit;
  display:inline-flex; align-items:center; gap:5px;
}
.nav-dd::before{
  content:""; order:2; width:6px; height:6px; margin-top:-3px;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg);
  transition:transform .16s ease;
}
.dd.open .nav-dd::before{ transform:rotate(-135deg); margin-top:3px; }
.dd-panel{
  display:none; position:absolute; top:calc(100% + 14px); left:-12px; min-width:230px;
  background:#1b1b22; border:1px solid var(--line); border-radius:10px;
  box-shadow:0 20px 34px rgba(0,0,0,.34); padding:6px; z-index:1100;
}
.dd-panel::before{ content:""; position:absolute; left:0; right:0; top:-16px; height:16px; }
.dd.open .dd-panel{ display:block; animation:ddIn .16s ease both; }
@keyframes ddIn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.dd-item{ display:block; padding:8px 10px; border-radius:7px; color:var(--text); text-decoration:none; }
.dd-item b{ display:block; font-size:13px; font-weight:600; }
.dd-item small{ display:block; font-family:var(--mono); font-size:10.5px; color:var(--muted); margin-top:1px; }
.dd-item:hover, .dd-item.active{ background:rgba(249,201,64,.08); }
.dd-item:hover b, .dd-item.active b{ color:var(--accent); }

.visually-hidden{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ===== Каркас страниц (как .page на основном сайте) ===== */
.page{
  min-height:calc(100vh - var(--header-h));
  position:relative;
  padding:28px 0 40px;
}
.page::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:radial-gradient(circle at 1px 1px, rgba(51,51,64,.55) 1px, transparent 0);
  background-size:80px 80px;
  pointer-events:none;
  opacity:.7;
}
.page-wrap{
  position:relative;
  z-index:1;
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
}
.page-label{
  font-family:var(--mono);
  font-size:11px;
  color:var(--green);
  margin-bottom:6px;
}
.page-title{ margin:0 0 10px; font-size:30px; line-height:1.2; }
.page-sub{
  margin:0 0 22px;
  color:var(--text-2);
  font-size:14px;
  line-height:1.6;
  max-width:820px;
}
.hero-tag{
  display:inline-flex;
  background:#0f3328;
  border-radius:4px;
  padding:3px 10px;
  font-family:var(--mono);
  font-size:11px;
  color:var(--green);
  margin-bottom:16px;
}

.panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:16px;
}

.btn{
  border:1px solid var(--line);
  background:var(--bg);
  color:var(--text);
  border-radius:8px;
  padding:9px 14px;
  font:inherit;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .16s ease, color .16s ease, background .16s ease;
}
.btn:hover{ border-color:var(--accent); color:var(--accent); }
.btn:disabled{ opacity:.4; cursor:default; border-color:var(--line); color:var(--text); }
.btn--primary{ background:var(--accent); color:#151518; border-color:transparent; }
.btn--primary:hover{ background:#ffd65c; color:#151518; border-color:transparent; }

.input{
  width:100%;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:8px;
  padding:9px 12px;
  color:var(--text);
  font:inherit;
  font-size:13px;
  outline:none;
}
.input:focus{ border-color:var(--green); box-shadow:0 0 0 3px rgba(97,209,173,.15); }

/* ===== Карточки хаба ===== */
.tools-sec + .tools-sec{ margin-top:26px; }
.tools-sec__title{ margin:0 0 14px; font-size:22px; }
.tools{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:14px;
}
.tool-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:16px;
  color:var(--text);
  text-decoration:none;
  transition:border-color .18s ease, transform .18s ease;
}
.tool-card:hover{ border-color:#555566; transform:translateY(-2px); }
.tool-card__tag{ font-family:var(--mono); font-size:11px; color:var(--green); }
.tool-card__title{ font-size:17px; font-weight:700; }
.tool-card__desc{ font-size:13px; color:var(--muted); line-height:1.55; margin:0; }
.tool-card__go{ margin-top:auto; font-size:12px; color:var(--accent); font-family:var(--mono); }

.footer-bar{
  position:relative;
  z-index:1;
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
  border-top:1px solid var(--line);
  padding:14px 0 28px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  font-family:var(--mono);
  font-size:11px;
  color:var(--muted);
}
.footer-bar a{ color:var(--accent); text-decoration:none; }

/* Курсор печати заголовка (assets/cs.js) */
.type-caret{
  display:inline-block;
  width:.09em;
  min-width:2px;
  height:.92em;
  margin-left:.08em;
  vertical-align:-.08em;
  background:var(--accent);
}
.type-caret.blink{ animation:type-caret-blink .9s step-end 3 forwards; }
@keyframes type-caret-blink{ 0%{ opacity:1; } 50%, 100%{ opacity:0; } }

@media (max-width: 900px){
  :root{ --header-h:56px; }
  .site-header .wrap, .page-wrap, .footer-bar{ width:calc(100% - 32px); }
  .nav{ gap:14px; }
  .page-title{ font-size:26px; }
  .page-sub{ font-size:13px; }
  .panel{ padding:14px; }
}
@media (max-width: 560px){
  .brand-text{ display:none; }
  .dd-panel{ left:auto; right:-60px; }
  .nav-link--out{ padding:5px 9px; }
  .page::before{ background-size:58px 58px; opacity:.55; }
}
