/* DMARCS Help Center — shared stylesheet.

   Same brand tokens as the Trust Center (dmarcs-trust-center/trust.css),
   pulled from the live www.dmarcs.com, not the admin app's own theme - this
   folder is hosted on the marketing site, not the app.
     --color-primary   #1565C0   (CTA buttons, links, "Get Started")
     --color-secondary #6AACFE   (secondary CTA, light accents)
     --color-heading    #0F1926   (headings on light sections)
     --bg-hero          #0D3B6F   (dark hero/section background)
     --bg-light         #EAF3FF   (light section background)
     --color-body        #403A56   (body copy)
   Fonts: Plus Jakarta Sans (headings), Inter (body). Buttons pill-shaped.

   Structural pattern (hero search bar, category card grid, category banner
   + breadcrumb + "in this category" sidebar) modeled on real Zendesk-style
   help centers (KnowBe4 Knowledge Base, Mimecast Support) at the user's
   request - the layout convention visitors already expect from a help
   center, not a from-scratch design.
*/

:root {
  --color-primary: #1565C0;
  --color-secondary: #6AACFE;
  --color-heading: #0F1926;
  --bg-hero: #0D3B6F;
  --bg-light: #EAF3FF;
  --color-body: #403A56;
  --color-muted: #6b7280;
  --white: #ffffff;
  --border: #dbe6f5;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --up: #22c55e;
  --warn: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--color-body);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  margin: 0 0 12px;
  line-height: 1.25;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}
.site-header .brand { display: flex; align-items: center; gap: 10px; }
.site-header img.logo { height: 26px; width: auto; display: block; }
.site-header .brand .divider { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.site-header .brand .product-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-heading);
}
.site-header nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-header nav a.back {
  color: var(--color-muted);
  font-size: 13.5px;
  font-weight: 500;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--color-muted);
  min-width: 180px;
}
.header-search svg { flex: 0 0 auto; }
.header-search input {
  border: none;
  outline: none;
  font: inherit;
  color: var(--color-heading);
  width: 100%;
  background: transparent;
}

/* ---------- Search hero (home) ---------- */
.help-hero {
  background: linear-gradient(180deg, var(--bg-light) 0%, #f6faff 100%);
  padding: 64px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.help-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  margin-bottom: 14px;
}
.help-hero h1 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 24px;
}
.search-box {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}
.search-box input {
  width: 100%;
  font: 16px/1.5 var(--font-body);
  padding: 16px 20px 16px 50px;
  border-radius: 100px;
  border: 1px solid var(--border);
  outline: none;
  color: var(--color-heading);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 25, 38, .08);
}
.search-box input:focus { border-color: var(--color-primary); }
.search-box svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
}
.search-results {
  max-width: 620px;
  margin: 8px auto 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 25, 38, .12);
  text-align: left;
  overflow: hidden;
  display: none;
}
.search-results.open { display: block; }
.search-results a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--color-heading);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--bg-light); text-decoration: none; }
.search-results .r-title { font-weight: 600; font-size: 14.5px; }
.search-results .r-cat { font-size: 12px; color: var(--color-muted); }
.search-results .r-empty { padding: 16px 20px; color: var(--color-muted); font-size: 14px; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 56px 0; }
.section.light { background: var(--bg-light); }
.section.white { background: var(--white); }
.section h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.section .lede { color: var(--color-muted); font-size: 15px; margin-bottom: 32px; max-width: 640px; }

/* ---------- Category grid (home) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.category-card:hover {
  box-shadow: 0 12px 28px rgba(15, 25, 38, .08);
  transform: translateY(-2px);
  border-color: var(--color-secondary);
  text-decoration: none;
}
.category-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  margin-bottom: 4px;
}
.category-card h3 { font-size: 17px; margin-bottom: 2px; color: var(--color-heading); }
.category-card p { color: var(--color-muted); font-size: 14px; margin: 0; flex: 1; }
.category-card .go {
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-top: 6px;
}

/* ---------- Category page: banner + breadcrumb ---------- */
.category-banner {
  background: var(--bg-light);
  padding: 46px 0 36px;
  border-bottom: 1px solid var(--border);
}
.category-banner .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--white);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(15, 25, 38, .08);
}
.category-banner h1 { font-size: 30px; margin-bottom: 6px; }
.category-banner p { color: var(--color-body); font-size: 15px; max-width: 600px; margin: 0; }

.breadcrumb {
  padding: 14px 0;
  font-size: 13.5px;
  color: var(--color-muted);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--color-muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }
.breadcrumb .current { color: var(--color-heading); font-weight: 600; }

/* ---------- Category page: sidebar TOC + article stack ---------- */
.category-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) { .category-layout { grid-template-columns: 1fr; } }

.toc {
  position: sticky;
  top: 84px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.toc .toc-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 10px;
  padding: 0 4px;
}
.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--color-body);
  font-size: 14px;
  font-weight: 500;
}
.toc a:hover { background: var(--bg-light); text-decoration: none; color: var(--color-primary); }

.article {
  scroll-margin-top: 80px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.article h2 { font-size: 20px; margin-bottom: 10px; }
.article p, .article li { color: var(--color-body); font-size: 15px; }
.article ul, .article ol { padding-left: 22px; margin: 10px 0; }
.article li { margin-bottom: 6px; }
.article ol > li { margin-bottom: 10px; }
.article code {
  background: var(--bg-light);
  color: var(--color-heading);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.article pre {
  background: var(--color-heading);
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.article pre code { background: none; color: inherit; padding: 0; }
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.article th, .article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.article th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-heading);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.article .callout {
  background: var(--bg-light);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 14px;
  margin: 14px 0;
}
.article .callout.warn { background: #fef3e2; border-left-color: var(--warn); }
.article .callout strong { color: var(--color-heading); }

/* ---------- FAQ accordion ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--color-heading);
  padding: 18px 30px 18px 0;
  position: relative;
}
.faq-q::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  font-size: 20px;
  color: var(--color-primary);
  font-weight: 400;
}
.faq-item.open .faq-q::after { content: "\2212"; }
.faq-a {
  display: none;
  color: var(--color-body);
  font-size: 14.5px;
  padding: 0 0 18px;
  max-width: 720px;
}
.faq-item.open .faq-a { display: block; }

/* ---------- Contact CTA ---------- */
.contact-cta {
  background: var(--bg-hero);
  border-radius: 16px;
  padding: 40px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.contact-cta h3 { color: var(--white); font-size: 20px; margin-bottom: 4px; }
.contact-cta p { color: #cfe0f7; margin: 0; font-size: 14.5px; }
.contact-methods { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 26px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: var(--white); }
.btn-primary:hover { background: #114f96; text-decoration: none; }
.btn-secondary { background: var(--color-secondary); color: var(--white); }
.btn-secondary:hover { background: #4f92e8; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* ---------- Panels (Contact page, Getting started) ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 28px;
  margin-bottom: 18px;
}
.panel h3 { font-size: 17px; margin-bottom: 8px; }
.panel p { margin: 0 0 10px; font-size: 14.5px; }
.panel p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-heading);
  padding: 34px 0;
  text-align: center;
}
.site-footer p { color: #8a93a6; font-size: 13px; margin: 0 0 8px; }
.site-footer a { color: #b9c3d4; font-size: 13px; margin: 0 10px; }
.site-footer a:hover { color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .help-hero h1 { font-size: 28px; }
  .category-banner h1 { font-size: 24px; }
  .section h2 { font-size: 21px; }
  .site-header nav { gap: 12px; }
  .header-search { display: none; }
}
