/* ==========================================================================
   Block-editor content — blog posts AND standard pages (one stylesheet)
   --------------------------------------------------------------------------
   Everything an editor can put in the block editor is styled here, scoped under
   .dai-content. The SAME file is given to the editor (inc/blog.php strips the
   .dai-content scope and the editor adds its own), so what is typed in WordPress
   looks like the page. Sizes are rem (1rem = 16 design px at 1920; the mobile
   canvas rescales rem, so phones need no separate sizes).
   Headings: use "Heading 2" for chapters (they build the chapter list on blog
   posts), "Heading 3" / "Heading 4" for sub-sections. Never skip a level; the post title
   in the hero is the page's only h1, so do not use Heading 1 in the body.
   ========================================================================== */
.dai-content {
	font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: #333;
	letter-spacing: -.03em;       /* the designs use Inter 24pt (tighter than the text cut we ship) — keeps the line breaks of the comps */
	background: #e7e7e7;
	overflow-wrap: break-word;
}
.dai-content > :first-child { margin-top: 0; }
.dai-content > :last-child { margin-bottom: 0; }

.dai-content p { margin: 0 0 1.5rem; }
.dai-content strong, .dai-content b { font-weight: 700; color: #333; }
.dai-content em, .dai-content i { font-style: italic; }
.dai-content a { color: #5381F9; text-decoration: underline; text-underline-offset: .18em; }
.dai-content a:hover { color: #3f5bbf; }
.dai-content a:focus-visible { outline: 2px solid #5381F9; outline-offset: 2px; border-radius: 2px; }

/* chapters + sub-heads: the post heading scale (Urbanist bold: h2 24px, h3 20px, h4 18px at the 1920 design), dark on this light band */
.dai-content h2, .dai-content h3, .dai-content h4, .dai-content h5, .dai-content h6 { font-family: "Urbanist", ui-sans-serif, system-ui, sans-serif; font-weight: 700; color: #111; letter-spacing: 0; scroll-margin-top: 2rem; }
.dai-content h2 { font-size: 1.5rem; line-height: 1.25; margin: 2.5rem 0 1rem; }
.dai-content h3 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 .8rem; }
.dai-content h4, .dai-content h5, .dai-content h6 { font-size: 1.125rem; line-height: 1.35; margin: 1.6rem 0 .7rem; }
.dai-content > h2:first-child, .dai-content > h3:first-child, .dai-content > h4:first-child { margin-top: 0; }
.dai-content h3 + :is(ul, ol), .dai-content h4 + :is(ul, ol) { margin-top: 0; }

/* lists: the design uses a dash */
.dai-content ul, .dai-content ol { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.dai-content ul > li { position: relative; margin: 0; padding-left: 1.375rem; }
.dai-content ul > li::before { content: "-"; position: absolute; left: 0; }
.dai-content ol { counter-reset: dai-ol; }
.dai-content ol > li { position: relative; margin: 0; padding-left: 1.75rem; counter-increment: dai-ol; }
.dai-content ol > li::before { content: counter(dai-ol) "."; position: absolute; left: 0; }
.dai-content li > :is(ul, ol) { margin: .25rem 0 0; }

/* images: full column width, caption in italics underneath */
.dai-content figure { margin: 0 0 2.5rem; }
.dai-content figure img, .dai-content img { display: block; max-width: 100%; height: auto; }
.dai-content figure.wp-block-image img { width: 100%; }   /* pictures run the full width of the column, as in the designs */
.dai-content figure.alignleft, .dai-content figure.alignright { max-width: 50%; }
.dai-content figcaption, .dai-content .wp-element-caption { margin: .9rem 0 0; font-size: 1.125rem; line-height: 1.35; font-style: italic; color: #333; text-align: left; }
.dai-content .wp-block-video video, .dai-content video { display: block; width: 100%; height: auto; }
.dai-content .wp-block-embed__wrapper, .dai-content .wp-block-embed iframe, .dai-content iframe { max-width: 100%; }
.dai-content .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.dai-content .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* quotes, code, rules, tables */
.dai-content blockquote { margin: 0 0 1.5rem; padding: .25rem 0 .25rem 1.5rem; border-left: 3px solid #5381F9; }
.dai-content blockquote p:last-child { margin-bottom: 0; }
.dai-content blockquote cite { display: block; margin-top: .5rem; font-size: .875rem; font-style: normal; color: #555; }
.dai-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: rgba(0,0,0,.07); padding: .1em .35em; border-radius: .25rem; }
.dai-content pre { margin: 0 0 1.5rem; padding: 1rem 1.25rem; overflow-x: auto; background: #1d1d1d; color: #eee; border-radius: .6rem; font-size: .9rem; line-height: 1.5; }
.dai-content pre code { background: none; padding: 0; color: inherit; }
.dai-content hr, .dai-content .wp-block-separator { height: 0; margin: 2.5rem 0; border: 0; border-top: 3px solid #ccc; }
.dai-content table { width: 100%; margin: 0 0 1.5rem; border-collapse: collapse; font-size: .9375rem; }
.dai-content th, .dai-content td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid #ccc; vertical-align: top; }
.dai-content th { font-weight: 700; border-bottom-width: 2px; }

/* buttons + columns */
.dai-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.5rem; }
.dai-content .wp-block-button__link { display: inline-flex; align-items: center; min-height: 3.69rem; padding: 0 2.2rem; border: 1px solid #b7b7bf; border-radius: 1.25rem; background: #3f5bbf; color: #fff; font-family: "Arimo", Arial, Helvetica, sans-serif; font-size: 1.125rem; line-height: 1; text-decoration: none; }
.dai-content .wp-block-button__link:hover { background: #1e2234; color: #fff; }
.dai-content .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: #333; border-color: #333; }
.dai-content .wp-block-columns { display: flex; flex-wrap: wrap; gap: 2rem; margin: 0 0 1.5rem; }
.dai-content .wp-block-column { flex: 1 1 14rem; min-width: 0; }
.dai-content .alignwide, .dai-content .alignfull { max-width: 100%; }
.dai-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.dai-content .has-text-align-center { text-align: center; }
.dai-content .has-text-align-right { text-align: right; }

/* the editor canvas: keep the light page colour behind the blocks */
@media (max-width: 1023.98px) {
	.dai-content figcaption, .dai-content .wp-element-caption { font-size: 1rem; }
}
