/* Topic hub pages (tag.hbs and automation.hbs): intro, Start here, tips for users and admins,
   common questions, related tools. Uses the --ss-* tokens and shared classes from home-redesign.css,
   so colors follow the theme's light/dark switch. */

/* in-page links land below the fixed header */
.ss-hub-intro, [data-hub-section] { scroll-margin-top: 84px; }

/* intro + "On this page" */
.ss-hub-intro { border-top: 0; }
.ss-hub-intro__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.ss-hub-intro__grid:has(.ss-hub-toc:not([hidden])) { grid-template-columns: minmax(0, 1fr) 280px; }
.ss-hub-intro .ss-sec__title { margin-bottom: 14px; }
.ss-hub-toc { background: var(--ss-band); border: 1px solid var(--ss-line); border-radius: 12px; padding: 18px 20px 12px; }
.ss-hub-toc ul { list-style: none; margin: 0; padding: 0; }
.ss-hub-toc li { margin: 0; }
.ss-hub-toc a { display: block; padding: 9px 0; color: var(--ss-accent); font-weight: 600; font-size: .95rem; line-height: 1.3; text-decoration: none; }
.ss-hub-toc a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .ss-hub-intro__grid:has(.ss-hub-toc:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
}

/* text written in the Ghost editor (hub intro and common questions pages) */
.ss-prose { color: var(--ss-text); font-size: 1.02rem; line-height: 1.65; max-width: 72ch; }
.ss-prose > * { margin-top: 0; margin-bottom: 14px; }
.ss-prose > :last-child { margin-bottom: 0; }
.ss-prose p { line-height: 1.65; }
.ss-prose h2, .ss-prose h3, .ss-prose h4 { color: var(--ss-head); line-height: 1.3; margin-top: 24px; margin-bottom: 8px; }
.ss-prose h2 { font-size: 1.3rem; }
.ss-prose h3 { font-size: 1.12rem; }
.ss-prose h4 { font-size: 1rem; }
.ss-prose > :first-child { margin-top: 0; }
.ss-prose a { color: var(--ss-accent); text-decoration: underline; }
.ss-prose ul, .ss-prose ol { padding-left: 22px; }
.ss-prose li { margin-bottom: 6px; line-height: 1.55; }
.ss-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.ss-prose hr { border: 0; border-top: 1px solid var(--ss-line); margin: 20px 0; }

/* common questions: each question heading starts a new row */
.ss-faq { max-width: 80ch; }
.ss-faq > h2, .ss-faq > h3 { font-size: 1.12rem; border-top: 1px solid var(--ss-line); padding-top: 18px; margin-top: 18px; }
.ss-faq > h2:first-child, .ss-faq > h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ss-faq .kg-toggle-card { box-shadow: inset 0 0 0 1px var(--ss-line); border-radius: 10px; margin-bottom: 10px; }
.ss-faq .kg-toggle-heading-text { color: var(--ss-head); font-size: 1.05rem; }
.ss-faq .kg-toggle-card-icon svg { color: var(--ss-muted); }

/* audience label, from the hidden tags #user and #admin */
.ss-aud { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; color: var(--ss-accent); }
.m-article-card__info .ss-aud { position: absolute; top: 21px; right: 20px; z-index: 1; font-size: .68rem; color: var(--ss-muted); }
@media only screen and (min-width: 48rem) { .m-article-card__info .ss-aud { top: 26px; right: 25px; } }

/* start here */
.ss-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ss-start__card { display: flex; flex-direction: column; background: var(--ss-surface); border: 1px solid var(--ss-line); border-radius: 12px; overflow: hidden; box-shadow: var(--ss-shadow); }
.ss-start__img { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ss-band); }
.ss-start__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-start__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.ss-start__title { font-size: 1.2rem; line-height: 1.3; margin: 0; }
.ss-start__title a { color: var(--ss-head); text-decoration: none; }
.ss-start__title a:hover { color: var(--ss-accent); }
@media (max-width: 1000px) { .ss-start { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ss-start { grid-template-columns: minmax(0, 1fr); } }

/* tips for users / tips for admins */
.ss-paths-sec:not(:has(.ss-topic)) { display: none; }
.ss-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ss-paths .ss-topic__name { color: var(--ss-head); line-height: 1.3; margin-bottom: 2px; }
@media (max-width: 760px) { .ss-paths { grid-template-columns: minmax(0, 1fr); } }

/* latest tips heading row */
.ss-latest .ss-sec__head { align-items: center; }
