/* =========================================================================
   Publisher Integration Guide  (template-publisher-integration-guide.php)
   Standalone styles, enqueued only on this template. Scoped under
   .publisher-guide and aligned to the Torox brand:
     navy  #0a1f59   purple #6a38ff (hover #bb69ff)   green #b7f763
     fonts GeneralSans (body, inherited) / RobotoSlab (tabs)
   ========================================================================= */

.publisher-guide {
  --pg-ink: #0a1f59;
  --pg-ink-soft: #45506b;
  --pg-ink-faint: #6c799b;
  --pg-line: #e7e9f2;
  --pg-panel: #f7f8fb;
  --pg-accent: #6a38ff;
  --pg-accent-hover: #bb69ff;
  --pg-wash: #f5f2ff;
  --pg-green: #b7f763;
  --pg-warn-bg: #fff8e8;
  --pg-warn-accent: #e0a92e;
  --pg-warn-ink: #7a5a13;
  --pg-code-bg: #0e1430;
  --pg-radius: 8px;

  padding: 64px 0 96px;
  color: var(--pg-ink-soft);
  font-size: 16px;
  line-height: 1.65;
}
@media screen and (max-width: 1024px) {
  .publisher-guide {
    padding: 36px 0 56px;
  }
}

/* smooth in-page jumps */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- layout ---------- */
.publisher-guide > .container {
  display: flex;
  align-items: flex-start;
  column-gap: 72px;
}
@media screen and (max-width: 1024px) {
  .publisher-guide > .container {
    flex-flow: column wrap;
  }
}

/* ---------- in-page tabs (TOC) — FAQ list-pages look ---------- */
.publisher-guide .pub-guide-toc {
  display: flex;
  flex-flow: column nowrap;
  width: 288px;
  flex: 0 0 288px;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}
@media screen and (max-width: 1024px) {
  .publisher-guide .pub-guide-toc {
    flex-flow: column nowrap;
    position: static;
    width: 100%;
    flex: 1 0 auto;
    max-height: none;
    overflow: visible;
    margin-bottom: 36px;
  }
}

.publisher-guide .pub-guide-toc .grp {
  font-weight: 700;
  color: var(--pg-ink);
  margin: 26px 0 2px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.publisher-guide .pub-guide-toc .grp:first-child {
  margin-top: 0;
}

.publisher-guide .item-page {
  display: block;
  color: var(--pg-ink-faint);
  font-family: "RobotoSlab", sans-serif;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  padding: 11px 0 10px;
  border-bottom: 1px solid var(--pg-line);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.publisher-guide .item-page.sub {
  font-size: 14px;
  padding-left: 14px;
}
.publisher-guide .item-page:hover {
  color: var(--pg-accent-hover);
}
.publisher-guide .item-page.active {
  color: var(--pg-ink);
  font-weight: 600;
  border-bottom: 2px solid var(--pg-accent);
}

/* ---------- content column ---------- */
.publisher-guide .pub-guide-content {
  flex: 1;
  min-width: 0;
  max-width: 820px;
}

.publisher-guide section {
  padding: 44px 0;
  border-bottom: 1px solid var(--pg-line);
  scroll-margin-top: 24px;
}
.publisher-guide section:first-child {
  padding-top: 4px;
}
.publisher-guide section:last-child {
  border-bottom: 0;
}

/* ---------- typography ---------- */
.publisher-guide h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--pg-ink);
}
.publisher-guide h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  margin: 32px 0 10px;
  color: var(--pg-ink);
}
.publisher-guide h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--pg-ink);
}
.publisher-guide p {
  margin: 0 0 16px;
}
.publisher-guide a {
  color: var(--pg-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(106, 56, 255, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.publisher-guide a:hover {
  color: var(--pg-accent-hover);
  border-bottom-color: var(--pg-accent-hover);
}
.publisher-guide ul,
.publisher-guide ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.publisher-guide li {
  margin: 6px 0;
}
.publisher-guide strong,
.publisher-guide b {
  color: var(--pg-ink);
}

/* eyebrow label (was a boxed pill — now a clean brand label) */
.publisher-guide .track-tag {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pg-accent);
  margin-bottom: 8px;
}

/* ---------- screenshots ---------- */
.publisher-guide .pub-shot {
  display: block;
  max-width: 100%;
  height: auto;
  width: 88%;
  margin: 18px 0 6px;
  border: 1px solid var(--pg-line);
  border-radius: var(--pg-radius);
  box-shadow: 0 6px 22px rgba(10, 31, 89, 0.08);
}
@media screen and (max-width: 1024px) {
  .publisher-guide .pub-shot {
    width: 100%;
  }
}

/* ---------- inline code & code blocks ---------- */
.publisher-guide code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px;
  background: var(--pg-wash);
  color: var(--pg-accent);
  padding: 2px 6px;
  border-radius: 5px;
}
.publisher-guide pre {
  background: var(--pg-code-bg);
  color: #e7e9f5;
  padding: 18px 20px;
  border-radius: var(--pg-radius);
  overflow-x: auto;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.publisher-guide pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}
.publisher-guide .tok {
  color: #b79cff;
}
.publisher-guide .str {
  color: #b7f763;
}
.publisher-guide .com {
  color: #7d7591;
  font-style: italic;
}

/* ---------- callouts (unified left-accent style, less boxy) ---------- */
.publisher-guide .note,
.publisher-guide .warn {
  border-radius: 0 var(--pg-radius) var(--pg-radius) 0;
  padding: 14px 18px;
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
}
.publisher-guide .note {
  background: var(--pg-wash);
  border-left: 3px solid var(--pg-accent);
  color: var(--pg-ink-soft);
}
.publisher-guide .warn {
  background: var(--pg-warn-bg);
  border-left: 3px solid var(--pg-warn-accent);
  color: var(--pg-warn-ink);
}
.publisher-guide .note > strong:first-child,
.publisher-guide .warn > strong:first-child {
  display: block;
  margin-bottom: 4px;
}
.publisher-guide .warn > strong:first-child {
  color: var(--pg-warn-ink);
}

/* ---------- tables ---------- */
.publisher-guide table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 14.5px;
}
.publisher-guide th,
.publisher-guide td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--pg-line);
  vertical-align: top;
}
.publisher-guide th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pg-ink-faint);
  font-weight: 700;
}
.publisher-guide tbody tr:hover {
  background: var(--pg-panel);
}
.publisher-guide td code {
  font-size: 12.5px;
}
.publisher-guide .req {
  color: var(--pg-accent);
  font-weight: 700;
}
.publisher-guide .opt {
  color: var(--pg-ink-faint);
}

/* ---------- journey strip ---------- */
.publisher-guide .journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 8px 0 10px;
}
.publisher-guide .journey .step {
  padding: 18px 16px;
  border: 1px solid var(--pg-line);
  border-radius: var(--pg-radius);
  background: var(--pg-panel);
}
.publisher-guide .journey .n {
  font-size: 11px;
  font-weight: 700;
  color: var(--pg-accent);
  letter-spacing: 0.06em;
}
.publisher-guide .journey .t {
  font-weight: 600;
  margin: 5px 0 6px;
  font-size: 15px;
  color: var(--pg-ink);
}
.publisher-guide .journey .d {
  font-size: 13px;
  color: var(--pg-ink-faint);
  line-height: 1.45;
}

/* ---------- compare cards ---------- */
.publisher-guide .compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 8px 0 18px;
}
.publisher-guide .card {
  border: 1px solid var(--pg-line);
  border-radius: var(--pg-radius);
  padding: 22px 22px 20px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(10, 31, 89, 0.05);
}
.publisher-guide .card.api {
  border-top: 3px solid var(--pg-accent);
}
.publisher-guide .card.wall {
  border-top: 3px solid #2f9e8f;
}
.publisher-guide .card h3 {
  margin: 0 0 4px;
}
.publisher-guide .card .sub {
  font-size: 13px;
  color: var(--pg-ink-faint);
  margin-bottom: 14px;
}
.publisher-guide .card ul {
  padding-left: 18px;
  margin-bottom: 0;
  font-size: 14.5px;
}
.publisher-guide .card .best {
  font-size: 13.5px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--pg-line);
  color: var(--pg-ink-soft);
}

/* ---------- numbered step list ---------- */
.publisher-guide .steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.publisher-guide .steps > li {
  counter-increment: s;
  position: relative;
  padding: 0 0 30px 48px;
  border-left: 2px solid var(--pg-line);
  margin-left: 14px;
}
.publisher-guide .steps > li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.publisher-guide .steps > li::before {
  content: counter(s);
  position: absolute;
  left: -16px;
  top: -4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pg-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.publisher-guide .steps .st-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--pg-ink);
}

/* ---------- time pill ---------- */
.publisher-guide .time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef7e3;
  border: 1px solid #cfe9a6;
  color: #4f6b1f;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- responsive ---------- */
@media screen and (max-width: 768px) {
  .publisher-guide .compare,
  .publisher-guide .journey {
    grid-template-columns: 1fr;
  }
  .publisher-guide h2 {
    font-size: 25px;
  }
}
