/* ========================================================================
   Markaroo Help Center — shared styles
   Reuses design tokens from index.html (navy / gold / EB Garamond / Open Sans)
   ======================================================================== */

:root {
  --navy: #000F47;
  --navy-dark: #000A30;
  --gold: #a39161;
  --gold-light: #b5a474;
  --gold-bg: rgba(163,145,97,0.07);
  --offwhite: #FAFAF7;
  --nearblack: #0D0D1A;
  --sage: #004920;
  --sage-light: rgba(0,73,32,0.08);
  --pale-blue: #EDF0F4;
  --white: #FFFFFF;
  --coral: #810A0C;
  --coral-light: rgba(129,10,12,0.08);

  --fs-hero: clamp(2rem, 4vw, 3rem);
  --fs-h2: clamp(1.5rem, 2.5vw, 2rem);
  --fs-h3: clamp(1.1rem, 1.6vw, 1.3rem);
  --fs-body: clamp(0.95rem, 1.1vw, 1.05rem);
  --fs-small: 0.875rem;

  --font-heading: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --section-pad: clamp(3rem, 6vw, 5rem);
  --container: min(1180px, 92vw);

  --radius: 6px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 3px rgba(0,15,71,0.05), 0 4px 12px rgba(0,15,71,0.04);
  --shadow-elevated: 0 4px 16px rgba(0,15,71,0.07), 0 12px 40px rgba(0,15,71,0.05);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gold-rule: 1px solid rgba(163,145,97,0.22);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--nearblack);
  background: var(--offwhite);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: 0.55rem 1.25rem; font-size: var(--fs-small); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 10000;
  font-size: var(--fs-small);
}
.skip-link:focus { top: 1rem; }

/* ---------- navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250,250,247,0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: var(--gold-rule);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-img { height: 40px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--nearblack);
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--gold); }
.nav-toggle-input { display: none; }
.nav-toggle-label { display: none; }

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(250,250,247,0.98);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 0 1.5rem;
    gap: 1.25rem;
    border-bottom: var(--gold-rule);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  }
  .nav-toggle-input:checked ~ .nav-links {
    max-height: 480px;
    opacity: 1;
    padding: 1.5rem;
  }
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
  }
  .nav-toggle-label span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: all var(--transition);
  }
  .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .nav-toggle-label span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* ---------- page header ---------- */
.page-header {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(180deg, var(--white) 0%, var(--offwhite) 100%);
  border-bottom: var(--gold-rule);
}
.breadcrumb {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--gold); }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb-sep { color: rgba(163,145,97,0.5); margin: 0 0.5rem; }
.page-title {
  font-family: var(--font-heading);
  font-size: var(--fs-hero);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.page-lede {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: #4A5568;
  max-width: 720px;
  line-height: 1.65;
}

/* ---------- main two-column layout ---------- */
.help-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem clamp(3rem, 6vw, 5rem);
}
.side-nav {
  position: sticky;
  top: 96px;
  align-self: start;
  font-size: 0.92rem;
}
.side-nav-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}
.side-nav ul li { margin-bottom: 0.15rem; }
.side-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: #4A5568;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 2px solid transparent;
}
.side-nav a:hover { color: var(--navy); background: var(--gold-bg); }
.side-nav a.is-current {
  color: var(--navy);
  background: var(--gold-bg);
  border-left-color: var(--gold);
  font-weight: 600;
}
.side-nav-divider {
  height: 1px;
  background: rgba(163,145,97,0.18);
  margin: 1rem 0;
}

.help-content { min-width: 0; }
.help-content h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
}
.help-content h2:first-child { margin-top: 0; }
.help-content h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--navy);
  margin: 1.75rem 0 0.6rem;
}
.help-content p { margin-bottom: 1rem; color: #2D3748; }
.help-content p strong { color: var(--nearblack); font-weight: 600; }
.help-content a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.help-content a:hover { color: var(--gold); }
.help-content ul.bulleted, .help-content ol.numbered {
  list-style: revert;
  padding-left: 1.5rem;
  margin: 0 0 1rem 0;
}
.help-content ul.bulleted li, .help-content ol.numbered li { margin-bottom: 0.4rem; }
.help-content code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--gold-bg);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--navy);
}

@media (max-width: 900px) {
  .help-shell { grid-template-columns: 1fr; gap: 2rem; }
  .side-nav { position: static; }
}

/* ---------- step blocks (numbered) ---------- */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.step-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.25rem;
  align-items: start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  border-left: 3px solid var(--gold);
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-bg);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--gold);
  font-size: 1rem;
}
.step-row h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin: 2px 0 0.4rem;
}
.step-row p { margin-bottom: 0; font-size: 0.95rem; line-height: 1.6; }
.step-row p + p { margin-top: 0.5rem; }

/* ---------- callouts ---------- */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  border-left: 3px solid var(--gold);
  background: var(--gold-bg);
}
.callout-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
  color: var(--gold);
}
.callout p { margin: 0; color: var(--nearblack); }
.callout.tip { border-left-color: var(--gold); background: var(--gold-bg); }
.callout.tip .callout-label { color: var(--gold); }
.callout.success { border-left-color: var(--sage); background: var(--sage-light); }
.callout.success .callout-label { color: var(--sage); }
.callout.warning { border-left-color: var(--coral); background: var(--coral-light); }
.callout.warning .callout-label { color: var(--coral); }

/* ---------- hub topic cards ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}
@media (max-width: 1024px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .topic-grid { grid-template-columns: 1fr; } }
.topic-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.4rem;
  border: 1px solid #E2E8F0;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  color: inherit;
}
.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--gold);
}
.topic-card .topic-step {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.topic-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.4rem;
}
.topic-card p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  line-height: 1.55;
}
.topic-card .topic-arrow {
  display: inline-flex;
  align-items: center;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}
.topic-card .topic-arrow::after {
  content: '→';
  margin-left: 0.35rem;
  transition: transform var(--transition);
}
.topic-card:hover .topic-arrow::after { transform: translateX(3px); }

/* ---------- definition rows (e.g. role matrix) ---------- */
.def-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.def-table th, .def-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #EDF2F7;
  vertical-align: top;
}
.def-table thead th {
  background: var(--pale-blue);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.85rem;
}
.def-table tbody tr:last-child td { border-bottom: none; }
.def-table td:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }
.def-check { color: var(--sage); font-weight: 700; }
.def-dash { color: #CBD5E0; }

/* ---------- inline badges ---------- */
.ui-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--pale-blue);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.01em;
}
.ui-pill.gold { background: var(--gold-bg); color: var(--gold); }
.ui-pill.sage { background: var(--sage-light); color: var(--sage); }
.ui-pill.coral { background: var(--coral-light); color: var(--coral); }

/* ---------- prev / next ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: var(--gold-rule);
}
.pager a {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-card);
  border: 1px solid #E2E8F0;
  transition: all var(--transition);
}
.pager a:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow-elevated); }
.pager .pager-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.pager .pager-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.pager .next { text-align: right; }
.pager .prev::before { content: '← '; color: var(--gold); }
.pager .next::after  { content: ' →'; color: var(--gold); }
.pager .pager-spacer { background: transparent; box-shadow: none; border: none; pointer-events: none; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer {
  background: var(--navy-dark);
  padding: 3rem 0 2rem;
  color: rgba(255,255,255,0.5);
  font-size: var(--fs-small);
}
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}
.footer-desc { line-height: 1.65; margin-bottom: 1rem; }
.footer-heading { color: var(--white); font-weight: 600; margin-bottom: 0.75rem; }
.footer ul li { margin-bottom: 0.4rem; }
.footer a { transition: color var(--transition); }
.footer a:hover { color: var(--gold); }
.footer-legal { font-size: 0.78rem; color: rgba(255,255,255,0.35); margin-bottom: 1rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- diagram (simple role/flow chart) ---------- */
.flow-diagram {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
  align-items: center;
}
.flow-node {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold-bg);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  position: relative;
}
.flow-arrow {
  text-align: center;
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
}
@media (max-width: 700px) {
  .flow-diagram { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: 0.5rem 0; }
}

/* ---------- FAQ details ---------- */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid #E2E8F0; }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-answer { padding: 0 0 1.1rem; font-size: 0.95rem; color: #555; line-height: 1.7; }
.faq-answer p + p { margin-top: 0.6rem; }
