@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --sidebar-w:   272px;
  --navy:        #0177cf;
  --navy-mid:    #224d7a;
  --navy-hover:  #2a5e95;
  --accent:      #2596e6;
  --accent-dim:  #1a78c2;
  --accent-bg:   #e8f4fd;
  --text:        #1a1f2e;
  --text-mid:    #4b5563;
  --text-light:  #9ca3af;
  --border:      #e2e8f0;
  --bg:          #fcfcfc;
  --bg-white:    #fcfcfc;
  --bg-panel:    #f1f5f9;
  --red:         #dc2626;
  --green:       #16a34a;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.07);
  --shadow:      0 4px 20px rgba(0,0,0,.08);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.65; display: flex; min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--navy); display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.1);
  text-decoration: none;
}
.sidebar-logo img { width: 28px; height: 28px; opacity: .9; }
.sidebar-logo-text { font-size: .83rem; font-weight: 600; color: #fff; line-height: 1.25; }
.sidebar-logo-text span { display: block; font-weight: 400; color: rgba(255,255,255,.55); font-size: .72rem; margin-top: 2px; }

.sidebar-search { padding: 14px 16px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-search input {
  width: 100%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm); padding: 7px 10px 7px 32px;
  font-size: .8rem; color: rgba(255,255,255,.9); font-family: inherit; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.5)' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 9px center; transition: border-color .2s;
}
.sidebar-search input::placeholder { color: rgba(255,255,255,.4); }
.sidebar-search input:focus { border-color: rgba(255,255,255,.4); }

.nav-section { padding: 12px 0 8px; }
.nav-section-label { font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4); padding: 0 18px 6px; }

.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 18px;
  font-size: .83rem; color: rgba(255,255,255,.78); text-decoration: none; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--navy-hover); color: #fff; }
.nav-link.active { color: #fff; background: rgba(255,255,255,.14); font-weight: 600; }
.nav-link.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #fff; border-radius: 0 2px 2px 0; }
.nav-link .nav-icon { width: 15px; height: 15px; opacity: .7; flex-shrink: 0; }
.nav-link.active .nav-icon { opacity: 1; }

.nav-children .nav-link { padding-left: 38px; font-size: .79rem; color: rgba(255,255,255,.62); }
.nav-children .nav-link:hover { color: #fff; }
.nav-children .nav-link.active { color: #fff; font-weight: 500; }

.sidebar-footer { margin-top: auto; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: .72rem; color: rgba(255,255,255,.45); line-height: 1.55; }
.sidebar-footer a { color: rgba(255,255,255,.55); text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }

/* ── PAGE LAYOUT ── */
.page-wrap { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar { display: none; position: sticky; top: 0; z-index: 50; background: var(--navy); padding: 12px 20px; align-items: center; justify-content: space-between; }

/* PAGE HEADER */
.page-header { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 30px 64px 26px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .77rem; color: var(--text-light); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-light); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: .45; }
.breadcrumb .current { color: var(--text-mid); }
.page-title { font-size: 1.72rem; font-weight: 700; color: var(--text); letter-spacing: -.025em; line-height: 1.2; }

/* CONTENT */
.content-area { flex: 1; padding: 40px 64px 64px; max-width: 980px; }

h2 { font-size: 1.08rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; margin-top: 38px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
abbr { cursor: help; text-decoration: underline dotted var(--text-light); }

/* CHECKS BLOCK — unified */
.checks-block {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); margin: 0 0 28px;
}
.checks-block-title {
  padding: 12px 18px;
  background: var(--bg-panel);
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-mid);
  border-bottom: 1px solid var(--border);
}
.intro-checks { list-style: none; padding: 8px 0; }
.intro-checks li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 18px; font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.intro-checks li:last-child { border-bottom: none; }
.intro-checks li::before {
  content: ''; display: block; flex-shrink: 0;
  width: 3px; height: 18px; margin-top: 3px;
  background: var(--accent); border-radius: 2px;
}


/* HINT BOXES */
.hint-box {
  position: relative; margin: 20px 0 26px;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.hint-box-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.hint-box-accent.tip     { background: var(--accent); }
.hint-box-accent.warning { background: #f59e0b; }
.hint-box-accent.browser { background: #7c3aed; }
.hint-box-inner { display: flex; align-items: flex-start; gap: 14px; padding: 15px 20px 15px 22px; }
.hint-box-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.hint-box-icon.tip     { background: var(--accent-bg); color: var(--accent); }
.hint-box-icon.warning { background: #fef3c7; color: #b45309; }
.hint-box-icon.browser { background: #ede9fe; color: #7c3aed; }
.hint-box-icon svg { width: 17px; height: 17px; }
.hint-box-label { font-size: .71rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 5px; }
.hint-box-label.tip     { color: var(--accent-dim); }
.hint-box-label.warning { color: #b45309; }
.hint-box-label.browser { color: #6d28d9; }
.hint-box-text { font-size: .87rem; color: var(--text-mid); line-height: 1.6; }

/* COLUMN LEGEND */
.col-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 28px; }
.col-legend-item { padding: 12px 14px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .84rem; }
.col-legend-item strong { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: 4px; font-weight: 700; }

/* ERROR CATEGORIES */
.error-category { margin: 10px 0; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.error-category-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px; background: var(--accent);
  cursor: pointer; user-select: none; transition: background .15s;
}
.error-category-header:hover { background: var(--accent-dim); }
.error-category-title { font-size: .88rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.error-category-chevron { width: 18px; height: 18px; color: rgba(255,255,255,.7); flex-shrink: 0; transition: transform .25s; }
.error-category.open .error-category-chevron { transform: rotate(180deg); }
.error-category-body { display: none; }
.error-category.open .error-category-body { display: block; }

.error-row-header { display: grid; grid-template-columns: 1fr 1.8fr 140px; background: var(--bg-panel); border-bottom: 2px solid var(--border); }
.error-row-header span { padding: 8px 16px; font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mid); }
.error-row-header span:not(:last-child) { border-right: 1px solid var(--border); }
.error-row-header span:last-child { text-align: center; }

.error-row { display: grid; grid-template-columns: 1fr 1.8fr 140px; border-bottom: 1px solid var(--border); }
.error-row:last-child { border-bottom: none; }
.error-name { padding: 12px 16px; font-size: .84rem; font-weight: 600; color: var(--text); border-right: 1px solid var(--border); }
.error-reason { padding: 12px 16px; font-size: .82rem; color: var(--text-mid); border-right: 1px solid var(--border); line-height: 1.55; }
.error-status { padding: 12px 12px; display: flex; align-items: flex-start; justify-content: center; }

.status-text { font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: 5px; padding-top: 1px; }
.status-text.requires { color: var(--red); }
.status-text.ok       { color: var(--green); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-text.requires .status-dot { background: var(--red); }
.status-text.ok       .status-dot { background: var(--green); }

/* STEPS */
.steps { display: flex; flex-direction: column; margin: 24px 0; }
.step { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 50%; font-weight: 700; font-size: .82rem; margin-top: 2px; }
.step-title { font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.step-content p { font-size: .88rem; color: var(--text-mid); }

/* IMAGES */
.doc-image { display: block; max-width: 100%; height: auto; margin: 18px auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.doc-image-link { display: block; text-align: center; }

/* PATH — оригинальный стиль с эмодзи-стрелками */
.path-example {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  padding: 10px 16px; background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin: 10px 0 6px;
  font-size: .88rem; color: var(--text);
}
.path-root { font-weight: 700; color: var(--accent); }
.path-item { color: var(--text-mid); }
.path-sep  { color: var(--text-light); font-size: .8rem; }

/* GUILABEL */
.guilabel { display: inline-block; background: var(--bg-panel); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 1px 7px; font-size: .82rem; font-weight: 600; color: var(--text); font-family: 'JetBrains Mono', monospace; }

/* FAQ */
.faq-item { background: var(--bg-white); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.faq-q { padding: 15px 20px; font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: 10px; }
.faq-q-badge { width: 22px; height: 22px; flex-shrink: 0; background: var(--accent); color: #fff; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; }
.faq-a { padding: 4px 20px 16px; font-size: .88rem; color: var(--text-mid); }

/* TOC GRID */
.toc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0; }
.toc-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--text); transition: box-shadow .18s, border-color .18s, transform .18s; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.toc-card:hover { box-shadow: var(--shadow); border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.toc-card-icon { font-size: 1.4rem; margin-bottom: 4px; }
.toc-card-title { font-weight: 700; font-size: .95rem; }
.toc-card-desc { font-size: .8rem; color: var(--text-mid); line-height: 1.45; }
.toc-sub { list-style: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.toc-sub a { font-size: .78rem; color: var(--accent); display: block; padding: 1px 0; }

/* FOOTER */
.page-footer { padding: 20px 64px 28px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--text-light); }
.page-footer a { color: var(--text-light); }
.page-footer a:hover { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); }
  .page-wrap { margin-left: 0; }
  .topbar { display: flex; }
  .page-header, .content-area, .page-footer { padding-left: 20px; padding-right: 20px; }
  .page-title { font-size: 1.4rem; }
  .toc-grid, .col-legend { grid-template-columns: 1fr; }
  .error-row, .error-row-header { grid-template-columns: 1fr; }
  .error-name, .error-reason { border-right: none; border-bottom: 1px solid var(--border); }
  .error-status { justify-content: flex-start; }
}
