/* ============================================================
   Help Desk - help.snapchat.com-inspired layout in the
   fancy-v2-light design language (loaded after fancy.css).
   Index: search-first hero + shortcuts + category tiles.
   Category: header + article rows. Article: centered reader.
   ============================================================ */

.hd-hero,
.hd-cathead {
  padding: 150px 0 40px;
  text-align: center;
}

.hd-hero h1,
.hd-cathead h1 {
  font-size: clamp(38px, 5vw, 56px);
  color: var(--w-ink);
  margin: 14px 0 12px;
}

.hd-hero-sub {
  font-size: 18px;
  color: var(--w-mut);
  max-width: 560px;
  margin: 0 auto 30px;
}

.hd-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--w-mut2);
  margin-bottom: 16px;
}

/* ---------- Search ---------- */

.hd-search {
  position: relative;
  max-width: 480px;
  margin: 22px auto 0;
  text-align: left;
}

.hd-search-big { max-width: 640px; }

.hd-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--w-ph);
  font-size: 16px;
  pointer-events: none;
  z-index: 2;
}

.hd-search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  font: inherit;
  font-size: 16px;
  color: var(--w-ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--w-line2);
  border-radius: 980px;
  outline: none;
  box-shadow: 0 2px 10px rgba(31, 35, 33, 0.05);
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}

.hd-search-big .hd-search-input { padding: 18px 24px 18px 52px; font-size: 17px; }

.hd-search-input::placeholder { color: var(--w-ph); }

.hd-search-input:focus {
  border-color: var(--green-400);
  box-shadow: 0 0 0 4px var(--w-glow), 0 2px 10px rgba(31, 35, 33, 0.05);
}

.hd-search-results {
  position: absolute;
  z-index: 70;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 400px;
  overflow-y: auto;
  background: var(--w-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--w-line2);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
}

.hd-search-result {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  text-decoration: none;
}

.hd-search-result:hover,
.hd-search-result.selected { background: var(--blue-light); }

.hd-sr-section {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-700);
}

.hd-sr-title {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--w-ink);
}

.hd-sr-excerpt {
  display: block;
  font-size: 13px;
  color: var(--w-mut);
  margin-top: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hd-search-empty {
  position: absolute;
  z-index: 70;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--w-panel);
  border: 1px solid var(--w-line2);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 18px;
  color: var(--w-mut);
  font-size: 14px;
  text-align: center;
}

/* ---------- Shortcuts (popular articles) ---------- */

.hd-shortcuts-sec { padding: 10px 0 34px; }

.hd-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hd-shortcuts-sec .hd-shortcuts { justify-content: center; }

.hd-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--w-ink2);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}

.hd-shortcut:hover {
  color: var(--green-700);
  transform: translateY(-1px);
}

.hd-shortcut > i { color: var(--green-600); font-size: 13px; }

/* ---------- Category tiles (index) ---------- */

.hd-cats-sec { padding: 0 0 60px; }

.hd-cats-sec .hd-label { text-align: center; }

.hd-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.hd-cat {
  display: block;
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}

.hd-cat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.hd-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--blue-light);
  color: var(--green-700);
  font-size: 19px;
  margin-bottom: 14px;
}

.hd-cat h3 {
  font-size: 18px;
  color: var(--w-ink);
  margin: 0 0 8px;
}

.hd-cat p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--w-mut);
  margin: 0 0 14px;
}

.hd-cat-count {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green-700);
}

.hd-cat-count i { margin-left: 6px; font-size: 11px; }

.hd-cat-dev { max-width: none; }

.hd-cats-dev { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Category page ---------- */

.hd-cathead { padding-bottom: 26px; }

.hd-cathead .hd-breadcrumb { justify-content: center; margin-bottom: 22px; }

.hd-cathead-icon { margin-bottom: 10px; }

.hd-cathead .hd-search { margin-top: 26px; }

.hd-rows-sec { padding: 0 0 50px; }

.hd-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
}

.hd-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}

.hd-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hd-row-text { flex: 1; min-width: 0; }

.hd-row h2 {
  font-size: 17.5px;
  color: var(--w-ink);
  margin: 0 0 4px;
}

.hd-row p {
  font-size: 14px;
  color: var(--w-mut);
  margin: 0;
  line-height: 1.5;
}

.hd-row-chevron {
  color: var(--w-faint);
  font-size: 14px;
  flex: none;
}

.hd-row:hover .hd-row-chevron { color: var(--green-600); }

.hd-others-sec { padding: 0 0 60px; }

.hd-others-sec .hd-label,
.hd-others-sec .hd-shortcuts { text-align: center; justify-content: center; }

.hd-others-sec .hd-label { display: block; }

/* ---------- Breadcrumb ---------- */

.hd-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 13.5px;
  color: var(--w-mut2);
  margin-bottom: 26px;
}

.hd-breadcrumb a { color: var(--green-700); text-decoration: none; }
.hd-breadcrumb a:hover { text-decoration: underline; }
.hd-breadcrumb i { font-size: 9px; }
.hd-breadcrumb [aria-current] { color: var(--w-mut); }

/* ---------- Article page ---------- */

.hd-art { padding: 140px 0 50px; }

.hd-art-wrap { max-width: 780px; }

.hd-art-head h1 {
  font-size: clamp(30px, 4vw, 42px);
  color: var(--w-ink);
  margin: 0 0 12px;
}

.hd-art-head .hd-hero-sub {
  margin: 0 0 28px;
  max-width: none;
}

/* Body typography */

.hd-art-body { padding: 34px 38px; }

.hd-art-body h2 {
  font-size: 23px;
  color: var(--w-ink);
  margin: 34px 0 12px;
}

.hd-art-body h2:first-child { margin-top: 0; }

.hd-art-body h3 {
  font-size: 17px;
  color: var(--w-ink);
  margin: 24px 0 8px;
}

.hd-art-body p,
.hd-art-body li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--w-ink3);
}

.hd-art-body p { margin: 0 0 14px; }
.hd-art-body p > strong,
.hd-art-body li > strong { color: var(--w-ink); }

.hd-art-body ul,
.hd-art-body ol { padding-left: 22px; margin: 0 0 14px; }
.hd-art-body li { margin-bottom: 7px; }

.hd-art-body a { color: var(--green-700); text-decoration: none; }
.hd-art-body a:hover { text-decoration: underline; }

.hd-art-body code {
  font-family: var(--font-mono);
  font-size: 0.87em;
  background: var(--w-inset);
  border: 1px solid var(--w-line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--w-ink);
}

.hd-pre {
  background: var(--w-appinset);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
}

.hd-pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #dfe0e2;
  white-space: pre;
}

.hd-kbd {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--w-line2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  color: var(--w-ink);
}

/* Steps */

.hd-steps { margin: 0 0 20px; }

.hd-step {
  display: flex;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--w-line);
}

.hd-step:last-child { border-bottom: none; }

.hd-step-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-600);
  color: var(--w-onbrand);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.hd-step div {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--w-ink3);
}

.hd-step strong { color: var(--w-ink); }

/* Callouts */

.hd-callout {
  display: flex;
  gap: 13px;
  padding: 15px 17px;
  border-radius: 14px;
  border: 1px solid var(--w-line2);
  background: var(--w-inset);
  margin: 20px 0;
}

.hd-callout > i {
  color: var(--green-600);
  font-size: 16px;
  margin-top: 3px;
}

.hd-callout div { font-size: 14.5px; line-height: 1.6; color: var(--w-ink3); }
.hd-callout strong { color: var(--w-ink); }

.hd-callout-tip {
  background: rgba(51, 117, 77, 0.09);
  border-color: transparent;
}

.hd-callout-warn {
  background: rgba(242, 153, 74, 0.12);
  border-color: transparent;
}

.hd-callout-warn > i { color: var(--orange, #f2994a); }

/* Mini cards */

.hd-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.hd-mini-card {
  border: 1px solid var(--w-line);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.5);
}

.hd-mini-card > i { color: var(--green-600); font-size: 20px; margin-bottom: 9px; }

.hd-mini-card h3 {
  margin: 0 0 7px !important;
  font-size: 15.5px !important;
}

.hd-mini-card h3 a { color: var(--w-ink) !important; text-decoration: none; }
.hd-mini-card h3 a:hover { color: var(--green-700) !important; text-decoration: none; }

.hd-mini-card p { margin: 0 !important; font-size: 13.5px !important; }

/* Tables */

.hd-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14.5px;
}

.hd-table th {
  text-align: left;
  font-weight: 700;
  color: var(--w-ink);
  padding: 9px 13px;
  border-bottom: 2px solid var(--w-line2);
}

.hd-table td {
  padding: 9px 13px;
  border-bottom: 1px solid var(--w-line);
  color: var(--w-ink3);
  vertical-align: top;
}

/* Helpful / prev-next / related */

.hd-helpful {
  margin-top: 18px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hd-helpful h2 { font-size: 17px; color: var(--w-ink); margin: 0; }
.hd-helpful p { flex: 1; min-width: 200px; font-size: 14px; color: var(--w-mut); margin: 0; }

.hd-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.hd-pn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 48%;
  padding: 16px 20px;
  text-decoration: none;
}

.hd-pn:hover { box-shadow: var(--shadow-lg); }
.hd-pn-next { margin-left: auto; text-align: right; }

.hd-pn-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--w-mut2);
}

.hd-pn-title { font-weight: 600; color: var(--green-700); font-size: 15px; }

.hd-related { margin-top: 30px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hd-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .hd-hero, .hd-cathead { padding-top: 120px; }
  .hd-art { padding-top: 110px; }
  .hd-cats { grid-template-columns: 1fr; }
  .hd-grid-2 { grid-template-columns: 1fr; }
  .hd-art-body { padding: 24px 20px; }
  .hd-prevnext { flex-direction: column; }
  .hd-pn { max-width: 100%; }
  .hd-pn-next { text-align: left; }
  .hd-row { padding: 16px 18px; }
}
