/*
 * Post content styles. Loaded on the site and inside the block editor,
 * so a post looks the same while writing as it does once published.
 * Element rules use :where() so styles pasted inside a Custom HTML block always win.
 */
:where(.entry-content, .is-root-container) { font-size: 1.06rem; line-height: 1.7; counter-reset: nd-step; }
:where(.entry-content) > * { margin-top: 0; margin-bottom: 1.35em; }
:where(.entry-content, .is-root-container) :where(h2) { font-size: clamp(26px, 3vw, 34px); margin-top: 1.9em; margin-bottom: 0.55em; }
:where(.entry-content, .is-root-container) :where(h3) { font-size: 24px; margin-top: 1.7em; margin-bottom: 0.5em; }
:where(.entry-content, .is-root-container) :where(h4) { margin-top: 1.5em; margin-bottom: 0.5em; }
:where(.entry-content, .is-root-container) :where(ul, ol) { padding-left: 1.3em; }
:where(.entry-content, .is-root-container) :where(li) { margin-bottom: 0.45em; }
:where(.entry-content, .is-root-container) :where(blockquote) { margin-inline: 0; padding: 4px 0 4px 24px; border-left: 5px solid var(--marker); font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.35; letter-spacing: -0.015em; }
:where(.entry-content, .is-root-container) :where(blockquote) p:last-child { margin-bottom: 0; }
:where(.entry-content, .is-root-container) :where(blockquote cite) { display: block; margin-top: 10px; font-family: var(--body); font-weight: 400; font-size: 0.95rem; letter-spacing: 0; color: var(--muted); font-style: normal; }
:where(.entry-content, .is-root-container) :where(img) { border-radius: 12px; }
:where(.entry-content, .is-root-container) :where(figure) { margin-inline: 0; }
:where(.entry-content, .is-root-container) :where(figcaption) { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
:where(.entry-content, .is-root-container) :where(table) { width: 100%; border-collapse: collapse; font-size: 16px; }
:where(.entry-content, .is-root-container) :where(th, td) { border: 0; border-top: 1px solid var(--line); padding: 12px 14px 12px 0; text-align: left; vertical-align: top; }
:where(.entry-content, .is-root-container) :where(thead th) { border-top: 0; border-bottom: 2px solid var(--ink); font-family: var(--display); }
:where(.entry-content, .is-root-container) :where(.wp-block-table) { overflow-x: auto; }
:where(.entry-content, .is-root-container) :where(code) { background: var(--paper); border: 1px solid var(--line); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.88em; }
:where(.entry-content, .is-root-container) :where(pre) { background: var(--ink); color: #e6ecf5; padding: 20px 22px; border-radius: 12px; overflow-x: auto; font-size: 15px; }
:where(.entry-content, .is-root-container) :where(pre code) { background: none; border: 0; padding: 0; color: inherit; }
:where(.entry-content, .is-root-container) :where(hr) { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
:where(.entry-content, .is-root-container) :where(mark) { background: linear-gradient(transparent 55%, var(--marker) 55%); color: inherit; font-weight: 600; padding: 0 2px; }
/* Nothing inside a post may be wider than the column, including fixed-width blocks in pasted HTML. */
:where(.entry-content) :where(div, section, figure, img, svg, video, iframe, canvas, pre) { max-width: 100%; }
:where(.entry-content) :where(img, video) { height: auto; }
.entry-content .alignwide { margin-inline: 0; }
.entry-content .aligncenter { margin-inline: auto; display: block; }
.entry-content .alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.entry-content::after { content: ""; display: table; clear: both; }
.page-links { margin: 2em 0; font-weight: 600; }

/* ----- Boxes: choose these under "Styles" on a Group block -----
   Classic themes wrap group content in .wp-block-group__inner-container, so each rule covers both shapes.
   The title icon sits in the title's left padding (not a flex or grid item), so a link or italic
   word inside the title does not split the title into pieces. */
.wp-block-group[class*="is-style-nd-"] { --box: var(--badge); --box-on: var(--on-badge); padding: 26px 28px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.wp-block-group[class*="is-style-nd-"] > *,
.wp-block-group[class*="is-style-nd-"] > .wp-block-group__inner-container > * { margin-top: 0; margin-bottom: 0.8em; }
.wp-block-group[class*="is-style-nd-"] > :last-child,
.wp-block-group[class*="is-style-nd-"] > .wp-block-group__inner-container > :last-child { margin-bottom: 0; }
.wp-block-group[class*="is-style-nd-"] > :is(h2, h3, h4):first-child,
.wp-block-group[class*="is-style-nd-"] > .wp-block-group__inner-container > :is(h2, h3, h4):first-child { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 0.65em; position: relative; padding-left: 46px; min-height: 34px; align-content: center; }
.wp-block-group[class*="is-style-nd-"] > :is(h2, h3, h4):first-child::before,
.wp-block-group[class*="is-style-nd-"] > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { position: absolute; left: 0; top: 0; bottom: 0; margin-block: auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--box); color: var(--box-on); font-family: var(--body); font-size: 16px; font-weight: 700; line-height: 1; letter-spacing: 0; }
.wp-block-group.is-style-nd-takeaways { border-radius: var(--radius) var(--radius) var(--radius) 4px; }
.wp-block-group.is-style-nd-takeaways > :is(h2, h3, h4):first-child::before,
.wp-block-group.is-style-nd-takeaways > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { content: "★"; }
.wp-block-group.is-style-nd-tip { --box: #16803c; --box-on: #fff; border-left: 5px solid var(--box); }
.wp-block-group.is-style-nd-tip > :is(h2, h3, h4):first-child::before,
.wp-block-group.is-style-nd-tip > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { content: "✓"; }
.wp-block-group.is-style-nd-warning { --box: #c2410c; --box-on: #fff; border-left: 5px solid var(--box); }
.wp-block-group.is-style-nd-warning > :is(h2, h3, h4):first-child::before,
.wp-block-group.is-style-nd-warning > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { content: "!"; }
.wp-block-group.is-style-nd-note { --box: var(--muted); --box-on: #fff; border-left: 5px solid var(--box); }
.wp-block-group.is-style-nd-note > :is(h2, h3, h4):first-child::before,
.wp-block-group.is-style-nd-note > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { content: "i"; font-family: Georgia, serif; font-style: italic; }
.wp-block-group.is-style-nd-pros { --box: #16803c; --box-on: #fff; background: var(--white); }
.wp-block-group.is-style-nd-pros > :is(h2, h3, h4):first-child::before,
.wp-block-group.is-style-nd-pros > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { content: "+"; }
.wp-block-group.is-style-nd-cons { --box: #c22f3d; --box-on: #fff; background: var(--white); }
.wp-block-group.is-style-nd-cons > :is(h2, h3, h4):first-child::before,
.wp-block-group.is-style-nd-cons > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { content: "−"; }
.wp-block-group.is-style-nd-cta { background: var(--ink); border-color: var(--ink); color: #c9d3e0; padding: 34px 36px; }
.wp-block-group.is-style-nd-cta :is(h2, h3, h4) { color: #fff; }
.wp-block-group.is-style-nd-cta p { color: inherit; font-size: 18px; }
.wp-block-group.is-style-nd-cta > :is(h2, h3, h4):first-child,
.wp-block-group.is-style-nd-cta > .wp-block-group__inner-container > :is(h2, h3, h4):first-child { padding-left: 0; min-height: 0; font-size: 28px; }
.wp-block-group.is-style-nd-cta > :is(h2, h3, h4):first-child::before,
.wp-block-group.is-style-nd-cta > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before { content: none; }
.wp-block-group.is-style-nd-cta a:not(.wp-block-button__link) { color: #fff; }
.wp-block-group.is-style-nd-cta .wp-block-button__link { background: var(--marker); border-color: var(--marker); color: var(--on-marker); }
.wp-block-group.is-style-nd-cta .wp-block-button__link:hover { filter: brightness(1.08); background: var(--marker); border-color: var(--marker); color: var(--on-marker); }

/* ----- Lists: choose these under "Styles" on a List block ----- */
.wp-block-list[class*="is-style-nd-"] { list-style: none; padding-left: 0; }
.wp-block-list[class*="is-style-nd-"] > li { position: relative; }
.wp-block-list[class*="is-style-nd-"] > li:last-child { margin-bottom: 0; }
.wp-block-list.is-style-nd-check > li, .wp-block-list.is-style-nd-pros > li, .wp-block-list.is-style-nd-cons > li { padding-left: 34px; margin-bottom: 0.6em; }
.wp-block-list.is-style-nd-check > li::before, .wp-block-list.is-style-nd-pros > li::before, .wp-block-list.is-style-nd-cons > li::before {
	position: absolute; left: 0; top: 0.24em; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
	font-size: 12px; font-weight: 800; line-height: 1; color: var(--on-badge); background: var(--badge); content: "✓";
}
.wp-block-list.is-style-nd-pros > li::before { background: #16803c; color: #fff; }
.wp-block-list.is-style-nd-cons > li::before { background: #c22f3d; color: #fff; content: "✕"; }
.wp-block-list.is-style-nd-steps { counter-reset: nd-li; }
.wp-block-list.is-style-nd-steps > li { counter-increment: nd-li; padding: 5px 0 5px 56px; margin-bottom: 14px; min-height: 38px; }
.wp-block-list.is-style-nd-steps > li::before {
	content: counter(nd-li); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
	background: var(--badge); color: var(--on-badge); font-family: var(--display); font-weight: 800; font-size: 17px;
}
/*
 * Timeline: the bold label sits in a left column, the text beside it.
 * The label is floated into the row's left padding rather than placed with a grid, so the text
 * stays one block: links, italics and code inside it do not break the row apart, and the row
 * looks the same in the editor, where the text is wrapped in an extra element.
 */
.wp-block-list.is-style-nd-timeline { --nd-tl: 170px; --nd-tl-gap: 24px; }
.wp-block-list.is-style-nd-timeline > li { display: flow-root; padding: 16px 0 16px calc(var(--nd-tl) + var(--nd-tl-gap)); margin: 0; border-top: 1px solid var(--line); color: var(--muted); }
.wp-block-list.is-style-nd-timeline > li:last-child { border-bottom: 1px solid var(--line); }
.wp-block-list.is-style-nd-timeline > li > strong:first-child,
.wp-block-list.is-style-nd-timeline > li > :is(div, p, span) > strong:first-child { float: left; width: var(--nd-tl); margin-left: calc(-1 * (var(--nd-tl) + var(--nd-tl-gap))); color: var(--ink); font-family: var(--display); font-size: 19px; line-height: 1.35; letter-spacing: -0.015em; }
@media (max-width: 560px) {
	.wp-block-list.is-style-nd-timeline > li { padding-left: 0; }
	.wp-block-list.is-style-nd-timeline > li > strong:first-child,
	.wp-block-list.is-style-nd-timeline > li > :is(div, p, span) > strong:first-child { float: none; display: block; width: auto; margin: 0 0 4px; }
}

/* ----- Numbered step heading: numbers itself down the post ----- */
/* The number sits in the heading's left padding, centred on the heading text (1.28em = the circle's size
   in the heading's own font size; 1.375em = the heading's top padding seen from the smaller circle font). */
.wp-block-heading.is-style-nd-step { counter-increment: nd-step; position: relative; box-sizing: border-box; padding-top: 1.1em; padding-left: calc(1.28em + 16px); min-height: calc(1.1em + 1.28em); align-content: center; border-top: 1px solid var(--line); }
.wp-block-heading.is-style-nd-step::before {
	content: counter(nd-step); position: absolute; left: 0; top: 1.375em; bottom: 0; margin-block: auto; display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%;
	background: var(--badge); color: var(--on-badge); font-size: 0.8em; font-weight: 800; letter-spacing: -0.02em;
}
p.is-style-nd-meta { font-size: 15px; font-weight: 500; color: var(--muted); border-left: 3px solid var(--marker); padding-left: 12px; margin-top: -0.3em; }
p.is-style-nd-lead { font-size: 20px; line-height: 1.55; color: var(--muted); }

/* ----- Tables ----- */
.wp-block-table.is-style-nd-compare table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) var(--radius) 4px; overflow: hidden; }
.wp-block-table.is-style-nd-compare :is(th, td) { border: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; }
.wp-block-table.is-style-nd-compare thead th { background: var(--ink); color: #fff; border-bottom: 0; }
.wp-block-table.is-style-nd-compare tbody tr:nth-child(even) td { background: var(--paper); }
.wp-block-table.is-style-nd-compare tbody tr:last-child td { border-bottom: 0; }
.wp-block-table.is-style-nd-compare tbody td:first-child { font-weight: 600; }
.wp-block-table.is-style-stripes { border-bottom: 0; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--paper); }

/* ----- FAQ (Details block): ruled rows ----- */
.wp-block-details { border-top: 1px solid var(--line); }
:where(.entry-content) > .wp-block-details { margin-bottom: 0; }
:where(.entry-content) > .wp-block-details:not(:has(+ .wp-block-details)) { border-bottom: 1px solid var(--line); margin-bottom: 1.35em; }
.wp-block-details summary { cursor: pointer; list-style: none; position: relative; padding: 18px 40px 18px 0; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--body); font-size: 26px; font-weight: 400; color: var(--link); line-height: 1; }
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details summary:hover { color: var(--link); }
.wp-block-details > :not(summary) { margin-top: 0; color: var(--muted); }
.wp-block-details > :last-child:not(summary) { margin-bottom: 20px; }

/* ----- Other blocks ----- */
.wp-block-buttons { gap: 14px; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); border: 2px solid var(--ink); padding: 14px 26px; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ink); color: var(--on-ink); }
.wp-block-quote { border-left: 5px solid var(--marker); }
.wp-block-pullquote { border-block: 1px solid var(--line); padding: 1.4em 0; text-align: left; }
.wp-block-pullquote blockquote { border: 0; padding: 0; font-size: 1.6rem; }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); }
.wp-block-image img { border-radius: 12px; }
.wp-block-columns { gap: 20px; }

/* ----- Automatic table of contents ----- */
.nd-toc { border: 1px solid var(--line); border-radius: var(--radius) var(--radius) var(--radius) 4px; background: var(--paper); padding: 6px 28px; }
.nd-toc summary { cursor: pointer; padding: 16px 0; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.015em; }
.nd-toc ol { margin: 0 0 20px; padding-left: 1.4em; columns: 2 260px; column-gap: 40px; font-size: 16px; }
.nd-toc li { margin-bottom: 0.45em; break-inside: avoid; }
.nd-toc li::marker { color: var(--muted); }
.nd-toc a { color: var(--ink); text-decoration: none; }
.nd-toc a:hover { color: var(--link); text-decoration: underline; }
.entry-content :is(h2, h3)[id] { scroll-margin-top: 96px; }
