/* Unilog Blog Kit: shared component styles for kit posts.
 *
 * Loaded on the front end of kit posts (inside .blog-post.ubk) and inside the Classic Editor's
 * Visual tab (whose <body> carries the same two classes), so authors see what readers see.
 *
 * Values come from the live posts, not a brand PDF: brand blue #469CF8 (the post h2/h3 colour),
 * in-post link blue #2EA3F2, gold #FF9D00 and the 100px pill from the site buttons, body text
 * #1C1C1C. House rules carried over from the SpecBooks post (52007): no accent stripe on any card
 * edge, and nothing heavier than font-weight 600 inside components.
 *
 * Divi gives every <p> 20px of bottom padding; components reset it so their spacing is their own.
 */

.ubk {
	--ubk-blue: #469cf8;
	--ubk-link: #2ea3f2;
	--ubk-gold: #ff9d00;
	--ubk-gold-hover: #e88c00;
	--ubk-ink: #1c1c1c;
	--ubk-ink-strong: #14181f;
	--ubk-muted: #3a3f47;
	--ubk-line: #dce8f8;
	--ubk-tint: #f4f8fe;
	--ubk-tint-2: #edf4fd;
	--ubk-radius: 10px;
}

/* ---------- Short version (the AI answer block) ----------
   Outlined, not filled: the cards and the closing box are filled light blue, and a third filled
   box would read as wallpaper. Same design as the SpecBooks post's .tldr. */
.ubk .ubk-tldr {
	background: #fff;
	border: 1px solid var(--ubk-line);
	border-radius: var(--ubk-radius);
	padding: 24px 28px;
	margin: 1.75rem 0 2rem;
}
.ubk .ubk-tldr__label {
	margin: 0 0 10px;
	padding: 0;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--ubk-blue);
}
.ubk .ubk-tldr__body {
	margin: 0;
	padding: 0;
	font-size: 18px;
	line-height: 29px;
	color: var(--ubk-ink);
}

/* ---------- Tables ---------- */
.ubk .ubk-table {
	overflow-x: auto;
	margin: 2.25rem 0;
	-webkit-overflow-scrolling: touch;
}
.ubk table {
	width: 100%;
	border-collapse: collapse;
	border: 0;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	margin: 0;
}
.ubk th,
.ubk thead td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 2px solid #e5e7eb;
	background: #f9fafb;
	color: #111827;
	font-weight: 600;
	vertical-align: bottom;
}
.ubk td {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid #e5e7eb;
	color: #4b5563;
	vertical-align: top;
}
.ubk .ubk-table:not(.ubk-table--plain) tbody td:first-child {
	font-weight: 600;
	color: #111827;
}
/* A one-row "box" table (common in Docs pastes, e.g. post 48044's quote boxes) is not a data
   table. Render it like a callout: tinted box, body-size text, cells side by side. */
.ubk .ubk-table--plain table {
	background: var(--ubk-tint-2);
	border-radius: var(--ubk-radius);
	box-shadow: none;
	font-size: 18px;
	line-height: 29px;
}
.ubk .ubk-table--plain td {
	padding: 22px 26px;
	color: var(--ubk-ink);
	border: 0;
}
.ubk tbody tr:last-child td {
	border-bottom: 0;
}
.ubk tbody tr:nth-child(even) {
	background: #f9fafb;
}
.ubk th p,
.ubk td p {
	margin: 0;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
}

/* ---------- Cards ---------- */
.ubk .ubk-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 1.75rem 0;
}
.ubk .ubk-cards--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ubk .ubk-card {
	font-size: 17px;
	line-height: 27px;
	background: var(--ubk-tint);
	border: 1px solid #e1ebfa;
	border-radius: var(--ubk-radius);
	padding: 24px 26px;
	display: flex;
	flex-direction: column;
}
.ubk .ubk-card p {
	margin: 0 0 10px;
	padding: 0;
	font-size: 17px;
	line-height: 27px;
	color: var(--ubk-ink);
}
.ubk .ubk-card p:last-child {
	margin-bottom: 0;
}
.ubk .ubk-card .ubk-card__title {
	font-size: 18px;
	line-height: 26px;
	font-weight: 600;
	color: var(--ubk-ink-strong);
}
.ubk .ubk-card .ubk-card__more {
	margin-top: auto;
	padding-top: 10px;
	font-size: 15px;
	line-height: 22px;
}
.ubk .ubk-card__more a {
	color: var(--ubk-link);
	font-weight: 600;
	text-decoration: none;
}
.ubk .ubk-card__more a::after {
	content: "›";
	display: inline-block;
	margin-left: 5px;
}
.ubk .ubk-card__more a:hover {
	text-decoration: underline;
}

/* ---------- Callout ---------- */
.ubk .ubk-callout {
	font-size: 18px;
	line-height: 29px;
	background: var(--ubk-tint-2);
	border-radius: var(--ubk-radius);
	padding: 22px 26px;
	margin: 1.75rem 0;
}
.ubk .ubk-callout p {
	margin: 0 0 10px;
	padding: 0;
	font-size: 18px;
	line-height: 29px;
	color: var(--ubk-ink);
}
.ubk .ubk-callout p:last-child {
	margin-bottom: 0;
}
.ubk .ubk-callout strong {
	font-weight: 600;
	color: var(--ubk-ink-strong);
}

/* Lists inside components follow the component's text size. Two site rules get in the way:
   ".et_pb_post_content li {font-size:20px}" (snippet 20131) and a mis-scoped
   ".white-papers-template-default p, li, ul, ol {font-size:16px}" that hits every list on the site.
   Also don't leave Divi's list padding at the bottom of a box. */
.ubk .ubk-callout ul,
.ubk .ubk-callout ol,
.ubk .ubk-card ul,
.ubk .ubk-card ol,
.ubk td ul,
.ubk td ol,
.ubk .ubk-callout li,
.ubk .ubk-card li,
.ubk td li,
.ubk th li,
.ubk .ubk-callout li span,
.ubk .ubk-card li span,
.ubk td li span {
	font-size: inherit;
	line-height: inherit;
}
.ubk .ubk-callout ul:last-child,
.ubk .ubk-callout ol:last-child,
.ubk .ubk-card ul:last-child,
.ubk .ubk-card ol:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
}

/* ---------- Quote ----------
   No rule down the left edge (house rule: no accent stripes); a large blue opening mark instead. */
.ubk blockquote {
	position: relative;
	margin: 2rem 0;
	padding: 4px 0 4px 44px;
	border: 0;
	background: none;
}
.ubk blockquote::before {
	content: "“";
	position: absolute;
	left: 0;
	top: -6px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 64px;
	line-height: 1;
	color: var(--ubk-blue);
}
.ubk blockquote p {
	margin: 0 0 10px;
	padding: 0;
	font-size: 22px;
	line-height: 34px;
	font-style: normal;
	color: var(--ubk-ink-strong);
}
.ubk blockquote .ubk-quote__cite {
	margin: 0;
	font-size: 15px;
	line-height: 22px;
	color: var(--ubk-muted);
}
.ubk blockquote .ubk-quote__cite::before {
	content: "— ";
}

/* ---------- FAQ ---------- */
.ubk .ubk-faq {
	margin: 2.5rem 0 0;
	padding-top: 2rem;
	border-top: 1px solid var(--ubk-line);
}
.ubk .ubk-faq h3 {
	margin-top: 1.5rem;
}

/* ---------- Code ---------- */
.ubk pre {
	background: #14181f;
	color: #e6edf3;
	border-radius: var(--ubk-radius);
	padding: 20px 24px;
	margin: 1.75rem 0;
	overflow-x: auto;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 15px;
	line-height: 1.6;
	white-space: pre;
	tab-size: 4;
}
.ubk pre code {
	background: none;
	color: inherit;
	padding: 0;
	font: inherit;
	white-space: inherit;
}
.ubk :not(pre) > code {
	background: var(--ubk-tint);
	border: 1px solid #e1ebfa;
	border-radius: 4px;
	padding: 1px 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85em;
	color: var(--ubk-ink-strong);
}

/* ---------- Buttons ---------- */
.ubk .ubk-btn-row {
	margin: 1.5rem 0;
	padding: 0;
}
.ubk a.ubk-btn,
.ubk .ubk-btn-row a {
	display: inline-block;
	background: var(--ubk-gold);
	color: var(--ubk-ink);
	border-radius: 100px;
	padding: 14px 32px;
	font-size: 14px;
	line-height: 1;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.75px;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.ubk a.ubk-btn:hover,
.ubk a.ubk-btn:focus,
.ubk .ubk-btn-row a:hover,
.ubk .ubk-btn-row a:focus {
	background: var(--ubk-gold-hover);
	color: var(--ubk-ink);
	text-decoration: none;
}

/* ---------- Images ---------- */
.ubk img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}
.ubk .author-photo img {
	border-radius: 0; /* the About the Author box draws its own frame */
}
.ubk .wp-caption {
	max-width: 100%;
	margin: 2rem auto;
	padding: 0;
	border: 0;
	background: none; /* Divi draws a grey frame around captioned images by default */
}
.ubk .wp-caption img {
	display: block;
	margin: 0 auto;
}
.ubk .wp-caption-text {
	padding: 8px 0 0;
	font-size: 15px;
	line-height: 22px;
	color: var(--ubk-muted);
	text-align: center;
}
/* Lead photo (build-post.php "layout": "beside"): on desktop it sits beside the opening paragraphs, so the text
   starts under the header instead of ~970px down below a full-width photo (Rebecca, 2026-10-12). Tablets and phones
   keep it full width. Anything after the opening clears it. */
@media screen and (min-width: 981px) {
	.ubk img.ubk-lead {
		float: right;
		width: 44%;
		margin: 6px 0 18px 32px;
	}
	.ubk h2,
	.ubk h3,
	.ubk .ubk-tldr,
	.ubk table,
	.ubk .ubk-faq,
	.ubk p:has(> picture),
	.ubk p:has(> a > picture),
	.ubk p:has(> img.aligncenter),
	.ubk p:has(> a > img.aligncenter) {
		clear: both;
	}
}

/* ---------- Closing call-to-action ---------- */
.ubk .ubk-cta {
	background: var(--ubk-tint-2);
	border-radius: 12px;
	padding: 36px 34px;
	margin: 3rem 0 0;
	text-align: center;
}
.ubk .ubk-cta__head {
	margin: 0 0 10px;
	padding: 0;
	font-size: 24px;
	line-height: 32px;
	font-weight: 600;
	color: var(--ubk-ink-strong);
	text-wrap: balance;
}
.ubk .ubk-cta__body {
	margin: 0 auto 24px;
	padding: 0;
	max-width: 44rem;
	font-size: 18px;
	line-height: 28px;
	color: var(--ubk-muted);
	text-wrap: balance;
}
.ubk .ubk-cta__act {
	margin: 0;
	padding: 0;
}

/* ---------- Mobile ---------- */
@media screen and (max-width: 900px) {
	.ubk .ubk-cards--3 {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media screen and (max-width: 700px) {
	.ubk .ubk-tldr {
		padding: 20px 22px;
	}
	.ubk .ubk-tldr__body {
		font-size: 17px;
		line-height: 27px;
	}
	.ubk .ubk-cards {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
	.ubk .ubk-cta {
		padding: 28px 22px;
	}
	.ubk .ubk-cta__head {
		font-size: 21px;
		line-height: 29px;
	}
	.ubk .ubk-cta__body {
		font-size: 17px;
		line-height: 27px;
	}
	.ubk a.ubk-btn {
		padding: 15px 26px; /* 44px tall: the minimum tap target */
	}
	.ubk blockquote p {
		font-size: 19px;
		line-height: 29px;
	}
	.ubk pre {
		padding: 16px 18px;
		font-size: 14px;
	}

	/* Tables become one card per row, each cell labelled with its column name
	   (data-label is added by the plugin from the header row). */
	.ubk .ubk-table:not(.ubk-table--plain) {
		overflow: visible;
	}
	.ubk .ubk-table:not(.ubk-table--plain) table,
	.ubk .ubk-table:not(.ubk-table--plain) thead,
	.ubk .ubk-table:not(.ubk-table--plain) tbody,
	.ubk .ubk-table:not(.ubk-table--plain) tr,
	.ubk .ubk-table:not(.ubk-table--plain) th,
	.ubk .ubk-table:not(.ubk-table--plain) td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.ubk .ubk-table:not(.ubk-table--plain) table {
		box-shadow: none;
		background: none;
	}
	.ubk .ubk-table:not(.ubk-table--plain) thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
	.ubk .ubk-table:not(.ubk-table--plain) tbody tr {
		margin-bottom: 16px;
		border: 1px solid #e5e7eb;
		border-radius: 8px;
		overflow: hidden;
		background: #fff;
	}
	.ubk .ubk-table:not(.ubk-table--plain) tbody tr:nth-child(even) {
		background: #fff;
	}
	.ubk .ubk-table:not(.ubk-table--plain) td {
		border-bottom: 1px solid #f3f4f6;
		padding: 10px 16px;
	}
	.ubk .ubk-table:not(.ubk-table--plain) td:first-child {
		background: #f9fafb;
		font-size: 14px;
		letter-spacing: 0.03em;
		text-transform: uppercase;
	}
	.ubk .ubk-table:not(.ubk-table--plain) td[data-label]:not(:first-child)::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 2px;
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.05em;
		text-transform: uppercase;
		color: #6b7280;
	}
	.ubk .ubk-table:not(.ubk-table--plain) tbody tr td:last-child {
		border-bottom: 0;
	}
}

/* ---------- Image pop-up (assets/lightbox.js) ----------
   The dialog is appended to <body>, outside .ubk, so these rules are not scoped to it. */
.ubk .ubk-zoomable {
	cursor: zoom-in;
}
.ubk .ubk-zoomable:focus-visible,
.ubk a:focus-visible > .ubk-zoomable {
	outline: 3px solid var(--ubk-link);
	outline-offset: 3px;
}
html.ubk-lightbox-open {
	overflow: hidden; /* keep the page from scrolling behind the pop-up */
}
.ubk-lightbox {
	box-sizing: border-box;
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 56px 24px 24px;
	border: 0;
	background: transparent;
	overflow: auto;
	overscroll-behavior: contain;
}
.ubk-lightbox::backdrop {
	background: rgba(10, 13, 18, 0.88);
}
.ubk-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	margin: 0;
}
.ubk-lightbox__img {
	display: block;
	max-width: min(100%, 1600px);
	max-height: calc(100dvh - 140px);
	width: auto;
	height: auto;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
	cursor: default;
}
.ubk-lightbox.can-zoom .ubk-lightbox__img {
	cursor: zoom-in;
}
.ubk-lightbox.is-zoomed .ubk-lightbox__figure {
	align-items: flex-start;
	justify-content: flex-start;
}
.ubk-lightbox.is-zoomed .ubk-lightbox__img {
	max-width: none;
	max-height: none;
	cursor: zoom-out;
}
.ubk-lightbox__img:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 4px;
}
.ubk-lightbox__caption,
.ubk-lightbox__hint {
	max-width: 60rem;
	margin: 14px auto 0;
	padding: 0;
	color: #e6edf3;
	font-size: 15px;
	line-height: 22px;
	text-align: center;
}
.ubk-lightbox__hint {
	margin-top: 6px;
	color: #9aa4b2;
	font-size: 13px;
}
.ubk-lightbox.is-zoomed .ubk-lightbox__caption,
.ubk-lightbox.is-zoomed .ubk-lightbox__hint {
	display: none;
}
.ubk-lightbox__close {
	position: fixed;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #14181f;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.ubk-lightbox__close:hover,
.ubk-lightbox__close:focus-visible {
	background: #edf4fd;
	outline: none;
}
@media screen and (max-width: 700px) {
	.ubk-lightbox {
		padding: 64px 10px 16px;
	}
	.ubk-lightbox__img {
		max-height: calc(100dvh - 150px);
	}
}
