/* ============================================================
   Symphony Help Center
   Reuses the global design tokens from styles.css (:root)
   All classes are `hd-` prefixed to avoid collisions.
   ============================================================ */

body { overflow-x: hidden; }

/* ---------- Search row (first row below the site nav bar) ---------- */
.hd-searchrow {
  margin-top: 64px;
  position: sticky; top: 64px; z-index: 40;
  display: flex; align-items: center;
  padding: 11px 26px;
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.hd-searchrow .hd-searchbox { width: 100%; max-width: 560px; }
.hd-searchbox {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); color: var(--text-tertiary);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  width: 440px; max-width: 42vw; padding: 9px 13px; font-size: 14px; transition: border-color .2s;
}
.hd-searchbox:focus-within { border-color: var(--border-accent); }
.hd-searchbox input { border: 0; outline: 0; flex: 1; font-size: 14px; font-family: var(--font-sans); color: var(--text-primary); background: transparent; }
.hd-searchbox input::placeholder { color: var(--text-quaternary); }
.hd-kbd { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; white-space: nowrap; }

/* search results dropdown */
.hd-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-secondary); border: 1px solid var(--border-hover); border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0,0,0,.5); overflow: hidden; z-index: 60; max-height: 60vh; overflow-y: auto;
}
.hd-search-results a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background .15s; }
.hd-search-results a:last-child { border-bottom: 0; }
.hd-search-results a:hover, .hd-search-results a.hd-sr-active { background: var(--accent-dim); }
.hd-sr-section { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); }
.hd-sr-title { font-size: 14.5px; font-weight: 600; color: var(--text-primary); margin: 2px 0; }
.hd-sr-text { font-size: 12.5px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-sr-empty { padding: 16px 14px; font-size: 13.5px; color: var(--text-tertiary); }

/* ---------- 3-column shell ---------- */
.hd-shell { display: grid; grid-template-columns: 300px minmax(0,1fr) 240px; align-items: start; max-width: 1520px; margin: 0 auto; }
.hd-shell--norail { grid-template-columns: 300px minmax(0,1fr); }

/* ---------- Sidebar ---------- */
.hd-sidebar { border-right: 1px solid var(--border); padding: 26px 14px 60px 26px; position: sticky; top: 126px; height: calc(100vh - 126px); overflow-y: auto; }
.hd-nav-group { margin-bottom: 4px; }
.hd-group-head {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; font-family: var(--font-sans);
  font-size: 15.5px; font-weight: 600; color: var(--text-primary); padding: 9px 8px; border-radius: var(--radius-sm); transition: .15s;
}
.hd-group-head:hover { background: rgba(255,255,255,.03); }
.hd-nav-group.open > .hd-group-head { color: var(--accent); }
.hd-chev { transition: transform .18s ease; color: var(--text-quaternary); flex-shrink: 0; }
.hd-nav-group.open .hd-chev { transform: rotate(90deg); }
.hd-nav-group:not(.open) .hd-group-items { display: none; }
.hd-group-items { padding: 2px 0 6px 0; }
.hd-nav-link {
  display: block; padding: 7px 10px 7px 18px; margin: 1px 0; font-size: 14px;
  color: var(--text-tertiary); border-radius: var(--radius-sm); border-left: 2px solid transparent; transition: .15s; text-decoration: none;
}
.hd-nav-link:hover { background: rgba(255,255,255,.03); color: var(--text-secondary); }
.hd-nav-link.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; border-left-color: var(--accent); }

/* ---------- Main content ---------- */
.hd-content { padding: 40px 56px 80px; min-width: 0; }
.hd-content-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.hd-content-head { min-width: 0; }
.hd-content h1 { font-size: 42px; line-height: 1.12; font-weight: 800; letter-spacing: -1.2px; margin: 0 0 14px; color: var(--text-primary); }
.hd-subtitle { font-size: 20px; color: var(--text-tertiary); font-weight: 400; margin: 0 0 6px; line-height: 1.5; }
.hd-rule { border: 0; border-top: 1px solid var(--border); margin: 26px 0 30px; }

.hd-article { font-size: 16px; }
.hd-article h2 { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin: 46px 0 14px; color: var(--text-primary); scroll-margin-top: 140px; }
.hd-article h3 { font-size: 19px; font-weight: 600; margin: 30px 0 10px; color: var(--text-primary); scroll-margin-top: 140px; }
.hd-article p { margin: 0 0 16px; color: var(--text-secondary); line-height: 1.7; }
.hd-article ul, .hd-article ol { color: var(--text-secondary); padding-left: 22px; line-height: 1.7; }
.hd-article li { margin: 7px 0; }
.hd-article li::marker { color: var(--accent); }
.hd-article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--border-accent); }
.hd-article a:hover { color: var(--accent-hover); }
.hd-article strong { color: var(--text-primary); }
.hd-article code { font-family: var(--font-mono); font-size: 13.5px; background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; color: var(--text-secondary); word-break: break-word; }

/* tables */
.hd-article table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 14.5px; }
.hd-article th, .hd-article td { text-align: left; padding: 11px 14px; border: 1px solid var(--border); vertical-align: top; }
.hd-article th { background: rgba(255,255,255,.03); color: var(--text-primary); font-weight: 600; }
.hd-article td { color: var(--text-secondary); }
.hd-article tbody tr:nth-child(even) td { background: rgba(255,255,255,.015); }

/* numbered step lists with inline figures */
.hd-article ol.hd-steps { padding-left: 24px; }
.hd-article ol.hd-steps > li { margin: 14px 0 18px; padding-left: 6px; }
.hd-article ol.hd-steps > li::marker { color: var(--accent); font-weight: 600; }
.hd-article ol.hd-steps .hd-figure { margin: 14px 0 6px; }

/* figures */
.hd-figure { margin: 22px 0 28px; }
.hd-figure img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); display: block; }
.hd-figure figcaption { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-quaternary); margin-top: 10px; text-align: center; }

/* callout / note */
.hd-note { border: 1px solid var(--border-accent); background: var(--accent-dim); border-radius: var(--radius-md); padding: 14px 16px; margin: 22px 0; font-size: 14.5px; color: var(--text-secondary); }
.hd-note strong { color: var(--accent); }

/* copy button */
.hd-copy-btn button { display:flex; align-items:center; gap:8px; font-family:var(--font-sans); font-size:14px;
    background: var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-md); padding:9px 12px; cursor:pointer; color:var(--text-secondary); transition:.2s; white-space:nowrap; }
.hd-copy-btn button:hover { border-color: var(--border-accent); color: var(--text-primary); }

/* ---------- Prev/Next pager ---------- */
.hd-pager { display:flex; gap:16px; margin-top: 64px; }
.hd-page-link, .hd-page-spacer { flex:1; }
.hd-page-link { border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px 18px; transition:.2s; background: var(--bg-card); text-decoration: none; display: block; }
.hd-page-link:hover { border-color:var(--border-accent); background: var(--bg-card-hover); }
.hd-dir { font-family: var(--font-mono); font-size:12px; color:var(--accent); letter-spacing:.5px; }
.hd-ttl { font-size:16px; font-weight:600; color:var(--text-primary); margin-top:5px; }
.hd-next { text-align:right; }

/* ---------- Right rail ---------- */
.hd-rail { position: sticky; top: 126px; height: calc(100vh - 126px); overflow-y:auto; padding: 40px 24px 40px 8px; }
.hd-rail-label { font-family: var(--font-mono); font-size:11px; text-transform:uppercase; letter-spacing:.8px; color:var(--text-quaternary); font-weight:500; margin-bottom:14px; }
.hd-rail a { display:block; font-size:13.5px; color:var(--text-tertiary); padding:6px 0 6px 14px; border-left:2px solid var(--border); transition:.15s; text-decoration: none; }
.hd-rail a:hover { color:var(--text-secondary); }
.hd-rail a.active { color:var(--accent); border-left-color:var(--accent); font-weight:600; }
.hd-rail a.hd-rail-sub { padding-left: 26px; font-size: 12.5px; }

/* ---------- Home / landing ---------- */
.hd-home-intro { margin-bottom: 30px; }
.hd-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; }
.hd-home-card { border:1px solid var(--border); border-radius:var(--radius-lg); padding:20px; background: var(--bg-card); transition:.2s; text-decoration: none; display: block; }
.hd-home-card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); transform: translateY(-2px); }
.hd-home-card .hd-card-num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.hd-home-card .hd-card-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 8px 0 6px; }
.hd-home-card .hd-card-desc { font-size: 13.5px; color: var(--text-tertiary); line-height: 1.5; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px){ .hd-shell{ grid-template-columns: 300px minmax(0,1fr);} .hd-rail{display:none;} }
@media (max-width: 820px){
  .hd-shell, .hd-shell--norail { grid-template-columns: 1fr;}
  .hd-sidebar{display:none;}
  .hd-content{padding:28px 22px 60px;}
  .hd-content h1{font-size:32px;}
  .hd-searchrow{ padding: 10px 18px; }
  .hd-searchrow .hd-searchbox{ max-width: none; }
  .hd-pager{flex-direction:column;}
}
