/* ============================================================================
   SuiteDash 2026: journeys and user stories (inc/journeys.php; printed only on those pages, after site.css).

   The long-form family's reading layout (site.css "long-form"), drawn the same way: the title band as the hero
   on the blueprint grid, "On this page" beside the column (sticky; above the content under 1061px), one CTA
   band to close. Journeys get a timeline: one spine, a numbered node per stage, each stage a card whose parts
   sit side by side on wide screens. User stories read as docs: H2 sections on hairlines, the tables restyled
   and stacked into labeled rows on phones, the related cards dark (D2).
   Content is styled, never edited: inline styles and the stories' own <style> are overridden here.
   ========================================================================= */

/* ---------------------------------------------------------------- the layout both types share */
:is(.sd-journey, .sd-story) .sd-entry {
	display: grid; align-items: start; padding-bottom: 88px;
	grid-template-columns:
		[full-start] max(var(--sd-gutter), calc((100% - var(--sd-max)) / 2))
		[toc-start] 200px [toc-end] minmax(48px, 1fr)
		[content-start] minmax(0, var(--sd-read)) [content-end] minmax(48px, 1fr)
		[wide-end] max(var(--sd-gutter), calc((100% - var(--sd-max)) / 2)) [full-end];
}
.sd-journey .sd-entry { --sd-read: 54rem; } /* a stage card holds two columns */
.sd-story .sd-entry { --sd-read: 44rem; }   /* docs with tables: a little wider than long-form's 40rem */
:is(.sd-journey, .sd-story) .sd-entry > * { grid-column: content; min-width: 0; }

/* the hero: title band, then the intro row on the same lattice */
:is(.sd-journey, .sd-story) .sd-entry > :is(.sd-secondary-header-color, .sd-jr-intro, .sd-story-intro) { grid-column: full; display: grid; grid-template-columns: subgrid; }
:is(.sd-journey, .sd-story) .sd-entry > :is(.sd-secondary-header-color, .sd-jr-intro, .sd-story-intro) > .wp-block-group__inner-container { grid-column: toc-start / wide-end; min-width: 0; }
:is(.sd-journey, .sd-story) .sd-entry > .sd-secondary-header-color {
	padding-block: 88px 64px; border-top: 1px solid var(--band); border-bottom: 1px solid var(--line);
	background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 56px 56px; background-position: center bottom;
}
:is(.sd-journey, .sd-story) .sd-entry > .sd-secondary-header-color:has(+ :is(.sd-jr-intro, .sd-story-intro)) { border-bottom: 0; padding-bottom: 0; }
:is(.sd-journey, .sd-story) .sd-entry > :is(.sd-jr-intro, .sd-story-intro) {
	padding-block: 26px 72px; border-bottom: 1px solid var(--line);
	background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 56px 56px; background-position: center top;
}
:is(.sd-journey, .sd-story) .sd-entry .sd-secondary-header-color :is(.wp-block-group__inner-container, .sd-row-inner) { padding: 0; }
:is(.sd-journey, .sd-story) .sd-entry .sd-secondary-header-color h1 {
	margin: 0 !important; padding: 0 !important; max-width: 22ch; text-align: left !important; color: var(--text) !important;
	font: 600 var(--t-h1)/1.04 var(--f-display) !important; letter-spacing: -.02em;
}
:is(.sd-journey, .sd-story) .sd-entry .sd-secondary-header-color h1 :is(b, strong) { font-weight: inherit; }
/* the journey's pitch: its H2 is the hero's accent sub-line, its paragraphs the muted intro (D3: left) */
.sd-journey .sd-entry .sd-jr-intro h2 {
	margin: 0; padding: 0; max-width: 40ch; text-align: left !important;
	font: 500 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.2 var(--f-display); letter-spacing: -.01em; color: var(--accent);
}
:is(.sd-journey, .sd-story) .sd-entry :is(.sd-jr-intro, .sd-story-intro) p { margin: 18px 0 0; max-width: 62ch; text-align: left !important; font: 400 19px/1.55 var(--f-text); color: var(--mute); }
:is(.sd-journey, .sd-story) .sd-entry :is(.sd-jr-intro, .sd-story-intro) p:first-child { margin-top: 0; }
:is(.sd-journey, .sd-story) .sd-entry :is(.sd-jr-intro, .sd-story-intro) p :is(b, strong) { font-weight: 500; color: var(--c-copy); }

/* "On this page": as long-form; a journey's stages carry their number in mono */
:is(.sd-journey, .sd-story) .sd-entry > .sd-toc { grid-column: toc; grid-row: span 300; align-self: stretch; padding-top: 48px; }
.sd-toc__list--steps a[data-n] { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); padding-left: 10px; }
.sd-toc__list--steps a[data-n]::before { content: attr(data-n); font: 500 12px/1.6 var(--f-num); color: var(--faint); }
.sd-toc__list--steps a[data-n]:hover::before { color: var(--accent); }
.sd-toc__list--steps a { padding-block: 5px; font-size: 13.5px; }
/* 13 to 19 entries: on a short screen the sticky list scrolls on its own instead of running off the bottom */
@media (min-width: 1061px) { :is(.sd-journey, .sd-story) .sd-toc__list { max-height: calc(100vh - var(--sd-header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; } }

/* body copy reads left (D3); the stories' own <style> sets 1.78 line-height: the theme's rhythm instead */
:is(.sd-journey, .sd-story) .sd-entry :is([style*="text-align: center"], [style*="text-align:center"]):not(h1, h2, h3, h4, h5, h6) { text-align: left !important; }

/* ---------------------------------------------------------------- journeys: "How it Works" (the fictional company) */
.sd-journey .sd-entry > .sd-jr-cast { margin-top: 48px; padding: 30px 34px 26px; border: 1px solid var(--line); background: var(--panel); }
.sd-journey .sd-entry .sd-jr-cast h2 { margin: 0 0 14px; text-align: center; font: 600 clamp(1.375rem, 1.1rem + .9vw, 1.875rem)/1.12 var(--f-display); letter-spacing: -.02em; }
.sd-journey .sd-entry .sd-jr-cast p { margin: 0 0 .8em; color: var(--c-copy); }
.sd-journey .sd-entry .sd-jr-cast p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- journeys: the timeline
   Node rows (p.journey-nums in a row of its own) draw the spine: a line in, the numbered node, a line out into the
   stage card under it. No spacer rows (the converter drops them; on live they were 3,226px of a 30,073px page). */
.sd-journey .sd-entry > .sd-step-node { display: flex; flex-direction: column; align-items: center; padding: 0; }
.sd-journey .sd-entry > .sd-step-node > .wp-block-group__inner-container { display: flex; flex-direction: column; align-items: center; }
.sd-journey .sd-entry > .sd-step-node > .wp-block-group__inner-container::before,
.sd-journey .sd-entry > .sd-step-node > .wp-block-group__inner-container::after { content: ""; display: block; width: 1px; background: var(--line-2); }
.sd-journey .sd-entry > .sd-step-node > .wp-block-group__inner-container::before { height: 36px; }
.sd-journey .sd-entry > .sd-step-node > .wp-block-group__inner-container::after { height: 18px; background: var(--accent); }
.sd-journey .sd-entry .journey-nums {
	display: grid; place-items: center; width: 48px; height: 48px; margin: 0 !important; padding: 0;
	font: 500 15px/1 var(--f-num); color: var(--text); background: var(--bg); border: 1px solid var(--accent); box-shadow: none;
}
/* each stage: a card hanging off the spine */
.sd-journey .sd-entry > .sd-step { padding: 32px 34px 36px; border: 1px solid var(--line-2); border-top-color: var(--accent); background: var(--bg); }
.sd-journey .sd-entry > .sd-step :is(.sd-row-inner, .wp-block-group__inner-container) { padding: 0; }
.sd-journey .sd-entry .sd-step__body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "aside" "story"; }
.sd-journey .sd-entry .sd-step__media { grid-area: media; }
.sd-journey .sd-entry .sd-step__head { grid-area: head; }
.sd-journey .sd-entry .sd-step__aside { grid-area: aside; }
.sd-journey .sd-entry .sd-step__story { grid-area: story; }
/* head: the stage's H2 and its lead, centered (D3: headings stay centered) */
.sd-journey .sd-entry .sd-step__head { margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); text-align: center; }
.sd-journey .sd-entry .sd-step__head h2 { margin: 0; text-align: center; font: 600 clamp(1.5rem, 1.15rem + 1.1vw, 2.1rem)/1.1 var(--f-display); letter-spacing: -.02em; }
.sd-journey .sd-entry .sd-step__head h5 { margin: 10px auto 0; max-width: 48ch; text-align: center; font: 400 var(--t-lead)/1.45 var(--f-text); color: var(--mute); }
/* media: the stage's illustration (line art drawn for a white page), framed */
.sd-journey .sd-entry .journey-image-container { max-width: none; margin: 0; }
.sd-journey .sd-entry .journey-pics { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; margin: 0; background: #FFFFFF; border: 1px solid var(--line-2); }
/* aside: the emoji points (H4s, a list on live) and the toolkits that power the stage */
.sd-journey .sd-entry .sd-step__aside { margin-top: 22px; }
.sd-journey .sd-entry .sd-step__aside > div:not(.powered-by-journey) h4 { margin: 0; padding: 10px 2px; border-bottom: 1px solid var(--line); text-align: left; font: 500 15px/1.4 var(--f-text); color: var(--text); text-wrap: pretty; }
.sd-journey .sd-entry .sd-step__aside > div:not(.powered-by-journey) h4:first-child { border-top: 1px solid var(--line); }
.sd-journey .sd-entry .powered-by-journey { max-width: none; margin: 22px 0 0; padding: 14px 16px 10px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 1px solid var(--accent); }
.sd-journey .sd-entry .powered-by-journey h6 { margin: 0 0 10px; text-align: left; font: 500 11.5px/1.4 var(--f-num); letter-spacing: .02em; color: var(--faint); }
.sd-journey .sd-entry .powered-by-journey h3 { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; padding: 0; border: 0; text-align: left; font-size: 0; line-height: 0; } /* the " + " between names: still in the HTML, not drawn */
.sd-journey .sd-entry .powered-by-journey h3 b { display: inline-block; padding: 4px 8px; border: 1px solid var(--line-2); font: 500 12px/1.3 var(--f-num); color: var(--text); }
/* story: the paragraphs (D3: left) */
.sd-journey .sd-entry .sd-step__story { margin-top: 24px; }
.sd-journey .sd-entry .sd-step__story > :first-child { margin-top: 0; }
.sd-journey .sd-entry .sd-step__story p { margin: 0 0 1em; color: var(--c-copy); }
.sd-journey .sd-entry .sd-step__story p:last-child { margin-bottom: 0; }
/* the closing stage: "Consolidate your workflows" and the sixteen modules, as a grid like the module wall */
.sd-journey .sd-entry .sd-step__story h3 { margin: 30px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); text-align: center; font: 600 1.25rem/1.3 var(--f-display); letter-spacing: -.01em; }
.sd-journey .sd-entry .sd-step__story ul[style*="list-style: none"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 0; padding: 0 1px 1px 0; list-style: none; }
.sd-journey .sd-entry .sd-step__story ul[style*="list-style: none"] > li { margin: 0 -1px -1px 0; padding: 9px 12px; border: 1px solid var(--line); text-align: left; font: 500 14px/1.35 var(--f-text); color: var(--text); }
.sd-journey .sd-entry .sd-step__story ul[style*="list-style: none"] > li::marker { content: none; }

/* a wide card (700px inside, whatever the screen: 1280 beside the page list, or 900 without it): head across the card,
   then the picture and its points beside the story */
.sd-journey .sd-entry > .sd-step { container-type: inline-size; }
@container (min-width: 700px) {
	.sd-journey .sd-entry .sd-step--split .sd-step__body { grid-template-columns: minmax(0, 17.5rem) minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "head head" "media story" "aside story"; column-gap: 36px; }
	.sd-journey .sd-entry .sd-step--plain .sd-step__body { grid-template-columns: minmax(0, 17.5rem) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "head head" "media story"; column-gap: 36px; }
	.sd-journey .sd-entry .sd-step__story { margin-top: 0; }
	.sd-journey .sd-entry .sd-step__media { align-self: start; }
}

/* ---------------------------------------------------------------- user stories: docs */
.sd-story .sd-entry .sd-user-story-content { padding-top: 8px; line-height: var(--lh-body); }
.sd-story .sd-entry .sd-user-story-content > .wp-block-group__inner-container { padding: 0; }
.sd-story .sd-entry .sd-user-story-content p { margin: 0 0 1.1em; line-height: var(--lh-body); }
.sd-story .sd-entry .sd-user-story-content li { margin: .4em 0; line-height: var(--lh-body); }
/* sections: one H2 each on a hairline, left as on live (the stories' rows are left-aligned there) */
.sd-story .sd-entry .sd-user-story-content h2 {
	margin: 56px 0 18px !important; padding-top: 44px; border-top: 1px solid var(--line); text-align: left;
	font: 600 clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem)/1.12 var(--f-display); letter-spacing: -.02em;
}
.sd-story .sd-entry .sd-user-story-content > .wp-block-group__inner-container > h2:first-child { margin-top: 48px !important; padding-top: 0; border-top: 0; } /* the hero's border already divides it */
.sd-story .sd-entry .sd-user-story-content h4 { margin: 28px 0 10px !important; text-align: left; font: 600 1.0625rem/1.4 var(--f-text); color: var(--text); }
.sd-story .sd-entry .sd-user-story-content h2 + h4 { margin-top: 8px !important; }
.sd-story .sd-entry .sd-user-story-subsection { margin: 0 0 4px !important; padding-left: 16px; border-left: 1px solid var(--line-2); }
.sd-story .sd-entry .sd-user-story-subsection > :last-child { margin-bottom: 0; }
/* tables ("At a glance", who uses it, settings): hairlines, mono header, in their own frame */
.sd-story .sd-entry .sd-user-story-content div:has(> table) { margin: 26px 0 30px; border: 1px solid var(--line); }
.sd-story .sd-entry .sd-user-story-content table { margin: 0 !important; width: 100% !important; font-size: 15px; }
.sd-story .sd-entry .sd-user-story-content th { padding: 11px 14px !important; border: 0 !important; border-bottom: 1px solid var(--line-2) !important; background: var(--panel); font: 500 12px/1.4 var(--f-num); color: var(--faint); }
.sd-story .sd-entry .sd-user-story-content td { padding: 12px 14px !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; color: var(--c-copy); line-height: 1.5; }
.sd-story .sd-entry .sd-user-story-content tbody tr:last-child td { border-bottom: 0 !important; }
.sd-story .sd-entry .sd-user-story-content td:first-child { color: var(--text); }
/* phones: each row a block of labeled lines (labels from data-th, drawn by CSS: no words added) */
@media (max-width: 640px) {
	.sd-story .sd-entry .sd-user-story-content div:has(> table) { overflow: visible !important; }
	.sd-story .sd-entry .sd-user-story-content table:has(td[data-th]),
	.sd-story .sd-entry .sd-user-story-content table:has(td[data-th]) :is(tbody, tr, td) { display: block; width: 100% !important; min-width: 0; overflow: visible; }
	/* the header row stays for screen readers, out of sight; its cells as blocks, so none is wider than its 1px box */
	.sd-story .sd-entry .sd-user-story-content table:has(td[data-th]) thead { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.sd-story .sd-entry .sd-user-story-content table:has(td[data-th]) thead :is(tr, th) { display: block; width: 1px; padding: 0 !important; }
	.sd-story .sd-entry .sd-user-story-content table:has(td[data-th]) tr { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
	.sd-story .sd-entry .sd-user-story-content table:has(td[data-th]) tbody tr:last-child { border-bottom: 0; }
	.sd-story .sd-entry .sd-user-story-content table:has(td[data-th]) td { padding: 6px 14px !important; border: 0 !important; }
	.sd-story .sd-entry .sd-user-story-content td[data-th]::before { content: attr(data-th); display: block; margin-bottom: 3px; font: 500 11.5px/1.4 var(--f-num); color: var(--faint); }
	/* a table whose header row is data (sd-table--rows): every row stacks, the header row first, no labels */
	.sd-story .sd-entry .sd-user-story-content table.sd-table--rows,
	.sd-story .sd-entry .sd-user-story-content table.sd-table--rows :is(thead, tbody, tr, th, td) { display: block; width: 100% !important; min-width: 0; overflow: visible; }
	.sd-story .sd-entry .sd-user-story-content table.sd-table--rows tr { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
	.sd-story .sd-entry .sd-user-story-content table.sd-table--rows tbody tr:last-child { border-bottom: 0; }
	.sd-story .sd-entry .sd-user-story-content table.sd-table--rows :is(th, td) { padding: 5px 14px !important; border: 0 !important; background: none; font: 400 15px/1.5 var(--f-text); color: var(--c-copy); }
	.sd-story .sd-entry .sd-user-story-content table.sd-table--rows :is(th, td):first-child { font-weight: 600; color: var(--text); }
}
/* "Related resources and next steps": the cards, dark (D2; their light styles are written inline) */
.sd-story .sd-entry .sd-related-reading { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0 !important; margin: 20px 0 0 !important; padding: 0 1px 1px 0; }
.sd-story .sd-entry .sd-related-card { margin: 0 -1px -1px 0; }
.sd-story .sd-entry .sd-related-card > a { padding: 16px 18px !important; background: transparent !important; border: 1px solid var(--line) !important; border-radius: 0 !important; color: var(--text) !important; transition: border-color .15s, background-color .15s; }
.sd-story .sd-entry .sd-related-card > a:hover { position: relative; z-index: 1; border-color: var(--accent) !important; background: var(--panel) !important; }
.sd-story .sd-entry .sd-related-card > a > span:nth-child(1) { font: 500 11.5px/1.4 var(--f-num) !important; letter-spacing: .02em !important; text-transform: none !important; color: var(--faint) !important; }
.sd-story .sd-entry .sd-related-card > a > span:nth-child(2) { font: 600 15px/1.35 var(--f-text) !important; color: var(--text) !important; }
.sd-story .sd-entry .sd-related-card > a > span:nth-child(3) { font: 500 12.5px/1.4 var(--f-num) !important; color: var(--accent) !important; }
@media (max-width: 640px) { .sd-story .sd-entry .sd-related-reading { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------------------------------------------------------------- under 1061px: one column, the page list after the hero */
@media (max-width: 1060px) {
	:is(.sd-journey, .sd-story) .sd-entry { grid-template-columns: [full-start] minmax(var(--sd-gutter), 1fr) [toc-start content-start] minmax(0, var(--sd-read)) [toc-end content-end wide-end] minmax(var(--sd-gutter), 1fr) [full-end]; }
	:is(.sd-journey, .sd-story) .sd-entry > .sd-toc { grid-row: auto; padding-top: 32px; }
	:is(.sd-journey, .sd-story) .sd-toc__list { position: static; padding: 16px 18px 10px; border: 1px solid var(--line); background: var(--panel); }
	:is(.sd-journey, .sd-story) .sd-toc a { padding: 6px 0 6px 12px; }
	/* a journey's 19 entries: two columns of numbered stages, so the list stays short */
	.sd-toc__list--steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
	.sd-toc__list--steps :is(.sd-toc__label, a:not([data-n])) { grid-column: 1 / -1; }
	.sd-toc__list--steps a[data-n] { padding-left: 8px; }
}
@media (max-width: 560px) {
	:is(.sd-journey, .sd-story) .sd-entry > .sd-secondary-header-color { padding-block: 48px 40px; }
	:is(.sd-journey, .sd-story) .sd-entry > :is(.sd-jr-intro, .sd-story-intro) { padding-bottom: 44px; }
	:is(.sd-journey, .sd-story) .sd-entry :is(.sd-jr-intro, .sd-story-intro) p { font-size: 17px; }
	:is(.sd-journey, .sd-story) .sd-entry { padding-bottom: 56px; }
	.sd-journey .sd-entry > .sd-jr-cast { margin-top: 32px; padding: 22px 18px 18px; }
	.sd-journey .sd-entry > .sd-step { padding: 22px 18px 24px; }
	.sd-journey .sd-entry > .sd-step-node > .wp-block-group__inner-container::before { height: 28px; }
	.sd-journey .sd-entry .sd-step__story ul[style*="list-style: none"] > li { padding: 8px 10px; font-size: 13.5px; }
	.sd-toc__list--steps a[data-n] { font-size: 13px; }
}

/* ---------------------------------------------------------------- a journey still in WPBakery (no fresh converted copy)
   The generic layer draws it; its spacer rows (34 "journey-line" lines and 34 25px gaps per page) shrink. */
.sd-journey-wpb .vc_empty_space { height: 12px !important; }
.sd-journey-wpb .vc_empty_space.journey-line { height: 28px !important; }
