:root {
  --ps-blue:    #1a8fe3;
  --ps-blue-dim: rgba(26,143,227,.18);
  --ps-red:     #9b2226;
  --bg-base:    #0d1117;
  --bg-surface: #161b22;
  --bg-raised:  #21262d;
  --border:     #30363d;
  --text:       #e6edf3;
  --text-muted: #8b949e;
  --green:      #3fb950;
  --radius:     10px;
  --shadow:     0 4px 16px rgba(0,0,0,.4);
  --shadow-sm:  0 1px 4px rgba(0,0,0,.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--ps-blue); text-decoration: none; }
a:hover { text-decoration: underline; color: #4aabf7; }

/* ── Header ── */
.site-header {
  background: rgba(13,17,23,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; color: var(--text); }
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--ps-blue-dim);
  border: 1px solid rgba(26,143,227,.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-blue);
}
.logo-icon svg { width: 18px; height: 18px; }

.logo-blue { color: var(--ps-blue); }
.logo-red  { color: var(--ps-red); }

.header-search {
  flex: 1;
  max-width: 460px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus { border-color: var(--ps-blue); }
.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.header-search .search-icon svg { width: 15px; height: 15px; }

.header-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-nav a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .875rem;
  color: rgba(230,237,243,.75);
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.header-nav a:hover { background: var(--bg-raised); color: var(--text); text-decoration: none; }
.header-nav .btn-contact {
  background: var(--ps-blue);
  color: #fff !important;
  padding: 6px 16px;
}
.header-nav .btn-contact:hover { background: #1580cc; }

/* ── Hero ── */
.hero {
  background: linear-gradient(160deg, rgba(0,0,0,.85) 0%, rgba(13,17,23,.8) 60%, rgba(26,143,227,.15) 100%),
              var(--bg-base);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 80px;
  text-align: center;
}
.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 8px;
}
.hero h1 .accent { color: var(--ps-blue); }
.hero > p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.hero-search {
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 14px 130px 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.hero-search input::placeholder { color: var(--text-muted); }
.hero-search input:focus { border-color: var(--ps-blue); }
.hero-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ps-blue);
  border: none;
  border-radius: 7px;
  padding: 8px 18px;
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: background .15s;
}
.hero-search button:hover { background: #1580cc; }

/* ── Main layout ── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Section heading ── */
.section-heading {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Category grid ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s, transform .2s, background .2s;
}
.category-card:hover {
  border-color: var(--ps-blue);
  transform: translateY(-2px);
  background: var(--bg-raised);
  text-decoration: none;
  color: var(--text);
}
.category-icon {
  width: 44px;
  height: 44px;
  background: var(--ps-blue-dim);
  border: 1px solid rgba(26,143,227,.3);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-blue);
  flex-shrink: 0;
}
.category-icon svg { width: 22px; height: 22px; }
.category-card h3 { font-size: .95rem; font-weight: 700; color: var(--text); }
.category-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.category-meta {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .825rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ps-blue); }
.breadcrumb a:hover { color: #4aabf7; text-decoration: none; }
.breadcrumb-sep { color: var(--border); }

/* ── Category page ── */
.category-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.category-header .category-icon { width: 52px; height: 52px; flex-shrink: 0; }
.category-header .category-icon svg { width: 26px; height: 26px; }
.category-header h1 { font-size: 1.625rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.category-header p { color: var(--text-muted); margin-top: 4px; font-size: .9rem; }

.article-list { display: flex; flex-direction: column; gap: 6px; }
.article-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .15s, background .2s;
}
.article-list-item:hover {
  border-color: var(--ps-blue);
  background: var(--bg-raised);
  transform: translateX(3px);
  text-decoration: none;
  color: var(--text);
}
.article-list-item .article-icon { color: var(--text-muted); flex-shrink: 0; }
.article-list-item .article-icon svg { width: 17px; height: 17px; }
.article-list-item .article-info { flex: 1; min-width: 0; }
.article-list-item h3 { font-size: .9rem; font-weight: 600; color: var(--text); }
.article-list-item p { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.article-list-item .arrow { color: var(--text-muted); flex-shrink: 0; }
.article-list-item .arrow svg { width: 15px; height: 15px; }

/* ── Article page ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 48px;
  align-items: start;
}
.article-body h1 {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--text);
}
.article-meta {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-meta a { color: var(--ps-blue); }
.article-content { line-height: 1.75; color: rgba(230,237,243,.9); }
.article-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 32px 0 10px;
  letter-spacing: -.01em;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-content h3 {
  font-size: .95rem;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--text);
}
.article-content p { margin-bottom: 14px; }
.article-content ul, .article-content ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.article-content li { margin-bottom: 5px; }
.article-content a { color: var(--ps-blue); }
.article-content a:hover { color: #4aabf7; }
.article-content strong { color: var(--text); font-weight: 600; }
.article-content code {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .85em;
  font-family: "Fira Code", "Cascadia Code", ui-monospace, monospace;
  color: #79c0ff;
}
.article-content pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  font-size: .85rem;
  line-height: 1.6;
}
.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: #e6edf3;
}
.article-content kbd {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-bottom-width: 3px;
  border-radius: 5px;
  padding: 1px 7px;
  font-size: .8em;
  font-family: inherit;
  color: var(--text);
}

/* ── Sidebar ── */
.article-sidebar { position: sticky; top: 76px; }
.sidebar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}
.sidebar-box h4 {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.sidebar-related { display: flex; flex-direction: column; gap: 2px; }
.sidebar-related a {
  font-size: .85rem;
  color: var(--text-muted);
  padding: 7px 9px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.sidebar-related a:hover { background: var(--ps-blue-dim); color: var(--ps-blue); text-decoration: none; }
.sidebar-related a svg { width: 13px; height: 13px; flex-shrink: 0; }

.helpful-box { text-align: center; }
.helpful-box p { font-size: .85rem; margin-bottom: 14px; color: var(--text-muted); }
.helpful-btns { display: flex; gap: 8px; justify-content: center; }
.helpful-btn {
  flex: 1;
  padding: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .85rem;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  transition: border-color .15s, background .15s, color .15s;
}
.helpful-btn:hover { border-color: var(--ps-blue); background: var(--ps-blue-dim); color: var(--ps-blue); }

/* ── Search results ── */
.search-header { margin-bottom: 28px; }
.search-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.search-header p { color: var(--text-muted); font-size: .875rem; margin-top: 4px; }
.search-result-item {
  padding: 18px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color .2s, transform .15s, background .2s;
}
.search-result-item:hover {
  border-color: var(--ps-blue);
  background: var(--bg-raised);
  transform: translateX(3px);
  text-decoration: none;
  color: var(--text);
}
.search-result-item .result-cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ps-blue);
  margin-bottom: 4px;
}
.search-result-item h3 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.search-result-item p { font-size: .85rem; color: var(--text-muted); }
.no-results { text-align: center; padding: 64px 0; color: var(--text-muted); }
.no-results svg { width: 44px; height: 44px; margin: 0 auto 16px; display: block; opacity: .3; }

/* ── Footer ── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { color: #484f58; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.625rem; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .header-search { display: none; }
  .header-nav .btn-contact { display: none; }
  .category-header { flex-direction: column; }
}

.text-muted { color: var(--text-muted); }
