/* ==========================================================================
   תן לי — single article template (single.php / inc/article.php).
   Loaded ONLY on a single blog post (see tenli_enqueue_article_assets()) so
   every other page on the site stays at its current CSS weight.
   Mobile-first: base rules below are the small-screen layout; min-width
   media queries at the bottom add the two-column desktop treatment.
   Reuses design tokens from main.css (--color-navy, --font-heading, etc.)
   and several existing components (.chip, .meta, .articles__grid,
   .article-card, .faq__list/.faq__item, .breadcrumbs, .btn) rather than
   redefining parallel versions of them.
   ========================================================================== */

.tenli-article {
	max-width: 1100px;
	margin-inline: auto;
	padding-inline: var(--gutter);
	padding-block: 24px 64px;
}

/* ---- header ---- */
.article-header { margin-block-end: 28px; }
.article-header__category { display: inline-block; margin-block-end: 14px; }
.article-header__title { font-size: 28px; line-height: 1.3; margin-block-end: 12px; }
.article-header__subtitle { font-size: 16px; line-height: 1.6; color: var(--color-text); opacity: 0.8; margin-block-end: 18px; }

.article-header__meta { display: flex; align-items: center; gap: 12px; margin-block-end: 16px; }
.article-header__avatar { border-radius: 50%; flex: none; }
.article-header__author { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 14.5px; color: var(--color-navy); }
.article-header__role { font-weight: 500; opacity: 0.7; }

.article-share { display: flex; gap: 8px; margin-block-end: 20px; }
.article-share__btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%;
	background: var(--color-bg-light); color: var(--color-navy);
	border: 0;
}
.article-share__btn svg { width: 18px; height: 18px; }
.article-share__btn:hover { background: var(--color-navy); color: var(--color-white); }
.article-share__copy.is-copied { background: var(--color-teal); color: var(--color-white); }

.article-header__image { margin: 0 0 8px; }
.article-header__image img { width: 100%; height: auto; border-radius: 16px; aspect-ratio: 16/9; object-fit: cover; }

/* ---- short answer / key takeaways ---- */
.article-short-answer, .article-takeaways {
	background: var(--color-bg-light);
	border-radius: 16px;
	padding: 20px 22px;
	margin-block-end: 20px;
}
.article-short-answer__title, .article-takeaways__title { font-size: 16px; margin-block-end: 10px; }
.article-short-answer p { font-size: 16px; line-height: 1.7; }
.article-takeaways ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.article-takeaways li {
	position: relative;
	padding-inline-start: 22px;
	font-size: 15px;
	line-height: 1.6;
}
.article-takeaways li::before {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	top: 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-teal);
}

/* ---- sidebar: one sticky card with up to 3 tabs (תוכן עניינים / ייעוץ /
   מדריכים) ----
   Replaces the previous layout where the sticky TOC and the plain-flow
   "sidebar modules" (consultation CTA + related list) were separate
   siblings stacked in the same column: once scrolled far enough, the TOC
   stayed pinned on screen while the modules below it kept scrolling
   normally underneath/behind it, so they visually collided. A single
   sticky card with only one panel visible at a time (article.js toggles
   .is-active) makes that collision structurally impossible — there's only
   ever one thing occupying the reserved space.
   Mobile-first: ships with the first available panel already visible (a
   no-JS visitor still gets real content, just no tab-switching); sticky at
   every width, same rationale .article-toc alone used to carry. Desktop-only
   sizing tweaks live in the 1024px query below. */
.article-sidebar-card {
	width: 100%;
	margin: 30px 0;
	background: var(--color-white);
	border: 1px solid #dde3ec;
	border-radius: 18px;
	box-shadow: 0 8px 28px rgba(5, 39, 72, 0.08);
	overflow: hidden;
	direction: rtl;
	position: sticky;
	top: 110px;
	z-index: 5;
}
/* 110px already clears the sitewide sticky .header-top's ~84px mobile
   height with room to spare, but not its ~130px desktop height — bumped at
   the same 780px breakpoint main.css uses for the header's own mobile/
   desktop switch. */
@media (min-width: 780px) {
	.article-sidebar-card { top: 145px; }
}

.article-sidebar-card__tabs { display: flex; border-bottom: 1px solid #dde3ec; }
.article-sidebar-card__tab {
	flex: 1;
	min-height: 50px;
	padding: 12px 6px;
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	opacity: 0.55;
	cursor: pointer;
}
.article-sidebar-card__tab.is-active { color: var(--color-navy); opacity: 1; border-bottom-color: var(--color-teal); }
@media (prefers-reduced-motion: no-preference) {
	.article-sidebar-card__tab { transition: color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease; }
}
.article-sidebar-card__tab:focus-visible { outline: 2px solid var(--color-teal); outline-offset: -2px; }

.article-sidebar-card__panels {
	padding: 20px;
	/* keeps a long panel (e.g. many H2s) from covering the whole screen
	   once pinned — same idea .article-toc used to carry alone, just
	   reduced by the tab bar's own height. */
	max-height: calc(100vh - 190px);
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: rgba(44, 52, 126, 0.25) transparent;
}
.article-sidebar-card__panels::-webkit-scrollbar { width: 6px; }
.article-sidebar-card__panels::-webkit-scrollbar-track { background: transparent; }
.article-sidebar-card__panels::-webkit-scrollbar-thumb { background: rgba(44, 52, 126, 0.25); border-radius: 99px; }
.article-sidebar-card__panel { display: none; }
.article-sidebar-card__panel.is-active { display: block; }

/* ---- panel: תוכן עניינים (H2 sections only — see tenli_article_toc_entries()) ---- */
.article-toc__list { list-style: none; margin: 0; padding: 0; }
.article-toc__item { border-bottom: 1px solid #dde3ec; }
.article-toc__item:last-child { border-bottom: none; }
.article-toc__link {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 14px;
	min-height: 58px;
	padding: 12px 8px;
	color: var(--color-navy);
	text-decoration: none;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 500;
	overflow-wrap: break-word;
}
@media (prefers-reduced-motion: no-preference) {
	.article-toc__link { transition: background-color 0.2s ease, color 0.2s ease; }
}
.article-toc__link:hover,
.article-toc__link:focus-visible { background: rgba(76, 186, 186, 0.08); border-radius: 10px; }
.article-toc__link:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }
.article-toc__link.is-active {
	background: linear-gradient(90deg, rgba(76, 186, 186, 0.08), rgba(44, 52, 126, 0.06));
	border-radius: 10px;
	color: var(--color-navy);
	font-weight: 700;
}
.article-toc__number {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 36px; height: 36px; min-width: 36px;
	border: 1px solid #3a4395;
	border-radius: 50%;
	font-size: 15px; font-weight: 700; color: var(--color-navy);
	background: var(--color-white);
}
.article-toc__link.is-active .article-toc__number { background: var(--color-teal); border-color: var(--color-teal); color: var(--color-white); }
.article-toc__text { flex: 1; min-width: 0; }

.article-toc__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 56px;
	margin-top: 18px;
	padding: 12px 20px;
	background: var(--color-teal);
	color: var(--color-white);
	border: 0;
	border-radius: 9px;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}
.article-toc__cta svg { width: 20px; height: 20px; flex: none; }
@media (prefers-reduced-motion: no-preference) {
	.article-toc__cta { transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
}
.article-toc__cta:hover {
	filter: brightness(0.92);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(76, 186, 186, 0.35);
}
.article-toc__cta:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }

/* ---- panel: ייעוץ ---- */
.sidebar-consultation { text-align: center; }
.sidebar-consultation__icon {
	display: flex; align-items: center; justify-content: center; flex: none;
	width: 52px; height: 52px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: rgba(76, 186, 186, 0.12);
	color: var(--color-teal);
}
.sidebar-consultation__icon svg { width: 24px; height: 24px; }
.sidebar-consultation__title { font-size: 19px; line-height: 1.4; font-weight: 800; color: var(--color-navy); margin: 0 0 12px; }
.sidebar-consultation__text { font-size: 15px; line-height: 1.7; font-weight: 400; color: var(--color-text); margin: 0 0 18px; }
.sidebar-consultation__button {
	display: flex; align-items: center; justify-content: center; gap: 9px;
	width: 100%; min-height: 44px;
	padding: 12px 18px;
	background: var(--color-teal);
	color: var(--color-white);
	border: 0; border-radius: 9px;
	font-size: 16px; line-height: 1.4; font-weight: 700;
	text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
	.sidebar-consultation__button { transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
}
.sidebar-consultation__button:hover { filter: brightness(0.92); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(76, 186, 186, 0.22); }
.sidebar-consultation__button:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }

/* ---- panel: מדריכים ---- */
.sidebar-related__list { list-style: none; margin: 0; padding: 0; }
.sidebar-related__item { border-bottom: 1px solid #dde3ec; }
.sidebar-related__item:last-child { border-bottom: 0; }
.sidebar-related__link {
	min-height: 44px;
	display: flex; align-items: flex-start; gap: 9px;
	padding: 10px 0;
	color: var(--color-text);
	font-size: 15px; line-height: 1.5; font-weight: 500;
	text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
	.sidebar-related__link, .sidebar-related__archive { transition: color 0.2s ease; }
}
.sidebar-related__link:hover, .sidebar-related__link:focus-visible { color: var(--color-teal); }
.sidebar-related__arrow { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--color-teal); }

.sidebar-related__archive {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px;
	margin-top: 14px; padding-top: 14px;
	border-top: 1px solid #dde3ec;
	color: var(--color-teal);
	font-size: 16px; font-weight: 700;
	text-decoration: none;
}
.sidebar-related__archive svg { width: 16px; height: 16px; }
.sidebar-related__archive:hover { color: var(--color-navy); }
.sidebar-related__archive:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }

/* ---- grid: mobile = stacked single column, order controls reading sequence ---- */
.article-grid { display: flex; flex-direction: column; gap: 28px; }
.article-toc-slot { order: 1; }
.article-main { order: 2; min-width: 0; }

/* ---- post body content ---- */
.tenli-article__content { font-size: 17px; line-height: 1.75; color: var(--color-text); }
/* Headings get scroll-margin (not JS) so a #anchor jump/TOC click lands
   with breathing room above it instead of flush against the viewport edge
   (the theme's header isn't sticky, so this isn't clearing a fixed bar). */
.tenli-article__content h2, .tenli-article__content h3 { scroll-margin-top: 120px; }
.tenli-article__content h2 { font-size: 22px; margin-block: 32px 14px; }
.tenli-article__content h3 { font-size: 18.5px; margin-block: 24px 10px; }
.tenli-article__content p { margin-block-end: 16px; }
.tenli-article__content ul, .tenli-article__content ol { margin-block-end: 16px; padding-inline-start: 22px; }
.tenli-article__content ul { list-style: disc; }
.tenli-article__content ol { list-style: decimal; }
.tenli-article__content li { margin-block-end: 8px; }
.tenli-article__content a { color: var(--color-navy); text-decoration: underline; text-underline-offset: 2px; }
.tenli-article__content a:hover { color: var(--color-teal); }
.tenli-article__content strong { font-family: var(--font-heading); }
.tenli-article__content img { border-radius: 12px; height: auto; }

.tenli-article__content blockquote {
	margin: 20px 0; padding: 16px 20px;
	border-inline-start: 4px solid var(--color-teal);
	background: var(--color-bg-light);
	border-radius: 0 12px 12px 0;
	font-style: italic;
	color: var(--color-text);
}

.tenli-article__content figure { margin: 20px 0; }
.tenli-article__content figure img { border-radius: 14px; width: 100%; }
.tenli-article__content figcaption { font-size: 13px; color: var(--color-text); opacity: 0.65; margin-block-start: 8px; text-align: center; }

/* Tables: mobile-first row-cards. Below 700px each <tr> renders as its own
   card and every value gets a small label above it (content: attr(data-label)),
   instead of forcing 3 equal-width text-heavy columns into a narrow screen.
   The 700px+ override below turns it back into a normal grid table.
   data-label is injected server-side from each table's <th> text — see
   tenli_article_prepare_content() in inc/article.php — so editors keep
   pasting plain tables with no extra markup. */
.tenli-article__content .wp-table-wrap { margin: 20px 0; }
.tenli-article__content table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tenli-article__content caption { caption-side: top; text-align: right; font-size: 13.5px; color: var(--color-text); opacity: 0.7; margin-block-end: 8px; }

.tenli-article__content thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tenli-article__content tbody tr {
	display: block;
	border: 1px solid var(--color-bg-light);
	border-radius: 12px;
	padding: 4px 14px;
	margin-block-end: 12px;
	background: var(--color-white);
}
.tenli-article__content td {
	display: block;
	padding: 10px 0;
	text-align: right;
	vertical-align: top;
	line-height: 1.65;
	border-bottom: 1px solid var(--color-bg-light);
}
.tenli-article__content td:last-child { border-bottom: none; }
.tenli-article__content td::before {
	content: attr(data-label);
	display: block;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.03em;
	color: var(--color-teal);
	margin-block-end: 4px;
}
.tenli-article__content td:first-child { font-family: var(--font-heading); font-weight: 700; font-size: 15.5px; color: var(--color-navy); }
.tenli-article__content td:first-child::before { content: none; }

/* Editorial callout boxes — for content authors to wrap a paragraph with
   e.g. <div class="tenli-callout tenli-callout--tip">...</div> via a Custom
   HTML block. Six variants per spec section 10; color/icon convey type,
   never color alone (each has its own label text too, not just a stripe). */
.tenli-callout {
	display: flex; gap: 12px; align-items: flex-start;
	border-radius: 12px; padding: 14px 16px; margin: 20px 0;
	font-size: 15px; line-height: 1.6;
}
.tenli-callout__icon { flex: none; width: 22px; height: 22px; margin-block-start: 2px; }
.tenli-callout__title { font-family: var(--font-heading); font-weight: 700; display: block; margin-block-end: 4px; }
.tenli-callout--info { background: var(--tint-navy-bg, #eef0f9); color: var(--color-text); }
.tenli-callout--info .tenli-callout__title { color: var(--tint-navy-fg, var(--color-navy)); }
.tenli-callout--note { background: var(--color-bg-light); color: var(--color-text); }
.tenli-callout--tip { background: var(--tint-teal-bg, #eaf6f6); color: var(--color-text); }
.tenli-callout--tip .tenli-callout__title { color: var(--tint-teal-fg, #1c6e6e); }
.tenli-callout--example { background: #fff; border: 1px dashed var(--color-navy); color: var(--color-text); }
.tenli-callout--source { background: var(--tint-navy2-bg, #eceefa); color: var(--color-text); }
.tenli-callout--warning { background: #fdecea; color: #7a2a24; }
.tenli-callout--warning .tenli-callout__title { color: #a4362f; }

/* ---- sources ---- */
.article-sources { margin-block: 28px; }
.article-sources h2 { font-size: 18px; margin-block-end: 12px; }
.article-sources ul { display: flex; flex-direction: column; gap: 8px; }
.article-sources li { font-size: 14px; line-height: 1.6; }
.article-sources a { color: var(--color-navy); }
.article-sources__date { color: var(--color-text); opacity: 0.6; font-size: 13px; }

/* ---- FAQ (reuses .faq__list/.faq__item from main.css) ---- */
.article-faq { margin-block: 28px; }
.article-faq__list { display: flex; flex-direction: column; gap: 12px; }
.article-faq .faq__item { display: block; min-height: 0; padding: 16px 20px; }
.article-faq .faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.article-faq .faq__item summary::after { content: '+'; font-size: 20px; color: var(--color-navy); flex: none; }
.article-faq .faq__item[open] summary::after { content: '−'; }
.article-faq .faq__item p { margin-block-start: 10px; font-size: 14.5px; line-height: 1.6; color: var(--color-text); }

/* ---- disclaimer ---- */
.article-disclaimer { font-size: 12.5px; line-height: 1.6; color: var(--color-text); opacity: 0.65; margin-block: 28px; padding-block-start: 16px; border-block-start: 1px solid var(--color-bg-light); }

/* ---- author card ----
   Whole card links to the author's archive page (author.php) — the name is
   the one real <a>, stretched via ::after to cover the entire card, same
   technique as .article-card__title-link/.related-post-card__title-link. */
.article-author { position: relative; background: var(--color-bg-light); border-radius: 16px; padding: 20px 22px; margin-block: 28px; }
@media (prefers-reduced-motion: no-preference) {
	.article-author { transition: box-shadow 0.2s ease, transform 0.2s ease; }
}
.article-author:hover { box-shadow: 0 8px 20px rgba(5, 39, 72, 0.12); transform: translateY(-2px); }
.article-author__row { display: flex; gap: 14px; align-items: flex-start; }
.article-author__avatar { border-radius: 50%; flex: none; }
.article-author__name { font-family: var(--font-heading); font-weight: 700; color: var(--color-navy); font-size: 15px; }
.article-author__name-link { color: inherit; text-decoration: none; }
.article-author__name-link::after { content: ''; position: absolute; inset: 0; }
.article-author__name-link:hover { text-decoration: underline; }
.article-author__name-link:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }
.article-author__role { font-size: 13px; opacity: 0.75; margin-block-start: 2px; }
.article-author__bio { font-size: 14px; line-height: 1.6; margin-block-start: 8px; opacity: 0.85; }
.article-author__meta { font-size: 12.5px; opacity: 0.7; margin-block-start: 12px; }

/* ---- prev/next ---- */

/* ---- related posts: pairs of 2 that auto-advance ----
   Mobile-first: each .related-posts__pair stacks its (up to 2) cards in one
   column; from 700px up it becomes a 2-column grid, which is the point —
   exactly 2 large cards on screen together. .related-posts__viewport clips
   to one pair's width/height; .related-posts__pairs is the sliding track
   (assets/js/related-posts.js sets its transform). A lone leftover card in
   the final pair (odd post count) gets ...pair--single so it doesn't sit
   awkwardly in a half-empty 2-column grid. */
.related-posts { margin-block-start: 40px; text-align: center; }
.related-posts__eyebrow {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 14px;
	background: rgba(76, 186, 186, 0.12);
	color: var(--color-teal);
	border-radius: 999px;
	font-family: var(--font-heading); font-weight: 700; font-size: 13px;
	margin-block-end: 14px;
}
.related-posts__eyebrow svg { width: 14px; height: 14px; flex: none; }
.related-posts__title { font-size: 24px; line-height: 1.35; font-weight: 800; color: var(--color-navy); margin: 0 0 10px; }
.related-posts__subtitle { font-size: 15px; line-height: 1.6; color: var(--color-text); opacity: 0.75; max-width: 56ch; margin: 0 auto 28px; }

.related-posts__duo { text-align: start; }
.related-posts__viewport { overflow: hidden; }
.related-posts__pairs { display: flex; }
@media (prefers-reduced-motion: no-preference) {
	.related-posts__pairs { transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1); }
}
.related-posts__pair { flex: 0 0 100%; display: flex; flex-direction: column; gap: 20px; }

.related-posts__dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-block-start: 20px; }
.related-posts__dot { width: 9px; height: 9px; border-radius: 50%; background: #dde3ec; border: 0; padding: 0; cursor: pointer; }
.related-posts__dot.is-active { background: var(--color-teal); width: 22px; border-radius: 5px; }
@media (prefers-reduced-motion: no-preference) {
	.related-posts__dot { transition: background-color 0.2s ease, width 0.2s ease; }
}
.related-posts__dot:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }

.related-posts__archive-link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	margin-block-start: 28px;
	padding: 13px 26px;
	background: transparent;
	color: var(--color-teal);
	border: 1.5px solid var(--color-teal);
	border-radius: 999px;
	font-size: 15px; font-weight: 700;
	text-decoration: none;
}
.related-posts__archive-link svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
	.related-posts__archive-link { transition: background-color 0.2s ease; }
}
.related-posts__archive-link:hover { background: rgba(76, 186, 186, 0.1); }
.related-posts__archive-link:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }

/* ---- related-post-card ---- */
.related-post-card {
	position: relative;
	display: flex; flex-direction: column;
	width: 100%; height: 100%;
	background: var(--color-white);
	border: 1px solid #dde3ec;
	border-radius: 16px;
	box-shadow: 0 4px 18px rgba(5, 39, 72, 0.06);
	overflow: hidden;
	text-align: start;
}
@media (prefers-reduced-motion: no-preference) {
	.related-post-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
}
.related-post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(5, 39, 72, 0.12); }

.related-post-card__image { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--color-bg-light); }
.related-post-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-post-card__chip { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; }
.related-post-card__chip .chip { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
/* No featured image to overlay (has_post_thumbnail() was false) — falls back
   to a plain inline chip above the title instead of floating on nothing. */
.related-post-card__chip--inline { position: static; display: inline-block; margin-block-end: 10px; }

.related-post-card__body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.related-post-card__title { font-size: 17px; line-height: 1.4; font-weight: 700; margin: 0 0 8px; }
.related-post-card__title-link {
	color: var(--color-navy);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* Stretched link: the whole card becomes one hit target, same technique as
   .article-card__title-link in main.css — .related-post-card__readmore
   below is deliberately NOT a second <a> to the same URL. */
.related-post-card__title-link::after { content: ''; position: absolute; inset: 0; }
@media (prefers-reduced-motion: no-preference) {
	.related-post-card__title-link { transition: color 0.2s ease; }
}
.related-post-card:hover .related-post-card__title-link { color: var(--color-teal); }

.related-post-card__excerpt {
	color: var(--color-text); opacity: 0.75;
	font-size: 14px; line-height: 1.6;
	margin: 0 0 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.related-post-card__meta {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding-block-start: 12px;
	border-block-start: 1px solid var(--color-bg-light);
	font-size: 12.5px; color: var(--color-text); opacity: 0.65;
}
.related-post-card__reading-time { display: inline-flex; align-items: center; gap: 4px; }
.related-post-card__reading-time svg { width: 13px; height: 13px; }
.related-post-card__readmore {
	position: relative; z-index: 0;
	display: inline-flex; align-items: center; gap: 4px;
	margin-block-start: 10px;
	color: var(--color-teal);
	font-size: 13.5px; font-weight: 700;
}
.related-post-card__readmore svg { width: 15px; height: 15px; }
.related-post-card:hover .related-post-card__readmore { color: var(--color-navy); }

/* ==========================================================================
   Tablet / desktop
   ========================================================================== */
@media (min-width: 700px) {
	.article-header__title { font-size: 32px; }
	.related-posts__title { font-size: 30px; }
	.related-posts__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
	.related-posts__pair--single { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }

	/* tables: back to a normal grid layout, thead visible again. Desktop-only
	   redesign per exact client spec (dark navy header, soft zebra rows,
	   card-style wrapper) — mobile row-cards above are untouched. */
	.tenli-article__content .wp-table-wrap { overflow-x: auto; }
	.tenli-article__content thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

	.tenli-article__content p:has(+ table) {
		text-align: center;
		max-width: 640px;
		margin: 0 auto 28px;
		line-height: 1.7;
		color: var(--color-text);
	}

	.tenli-article__content table {
		table-layout: fixed;
		border-collapse: separate;
		border-spacing: 0;
		direction: rtl;
		background: #ffffff;
		border: 1px solid #dde3ef;
		border-radius: 8px;
		overflow: hidden;
		box-shadow: 0 2px 12px rgba(16, 46, 92, 0.06);
		margin: 30px auto;
	}
	.tenli-article__content th {
		background: #102e5c;
		color: #ffffff;
		font-weight: 700;
		font-size: 18px;
		line-height: 1.4;
		text-align: center;
		padding: 18px 20px;
		border-left: 1px solid rgba(255, 255, 255, 0.14);
	}
	.tenli-article__content th:first-child,
	.tenli-article__content td:first-child { width: 16%; }
	.tenli-article__content tbody tr {
		display: table-row;
		border: none;
		border-radius: 0;
		padding: 0;
		margin-block-end: 0;
		background: #ffffff;
	}
	.tenli-article__content tbody tr:nth-child(even) { background: #f4f6fc; }
	.tenli-article__content tbody tr:hover { background: #eef2fb; }
	.tenli-article__content td {
		display: table-cell;
		font-size: 17px;
		line-height: 1.8;
		color: #16335a;
		text-align: right;
		vertical-align: middle;
		padding: 22px 24px;
		border-left: 1px solid #dde3ef;
		border-bottom: 1px solid #dde3ef;
	}
	.tenli-article__content tbody tr:last-child td { border-bottom: none; }
	.tenli-article__content td::before { content: none; }
	.tenli-article__content td:first-child {
		font-weight: 700;
		color: #16335a;
		text-align: center;
	}
	.tenli-article__content td:first-child a,
	.tenli-article__content th:first-child a {
		color: #16335a;
		text-decoration: none;
	}
	.tenli-article__content td:first-child a:hover { text-decoration: underline; }
}

@media (min-width: 1024px) {
	.tenli-article { padding-block: 40px 80px; }
	.article-header__title { font-size: 38px; }
	.article-header__image img { aspect-ratio: 21/9; }

	/* Both items pinned to row 1 explicitly: with only grid-column set (no
	   grid-row), auto-placement put article-toc-slot and article-main in TWO
	   SEPARATE rows instead of side by side — main ended up stacked ~800px
	   below the TOC instead of next to it. grid-row:1 on both is what
	   actually makes this a single-row, two-column layout. */
	.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 48px; align-items: start; }
	.article-main { grid-column: 1; grid-row: 1; }
	.article-toc-slot { grid-column: 2; grid-row: 1; }

	/* sidebar card: sticky/scroll behavior itself is set unconditionally
	   above (mobile included) — desktop only needs to drop the mobile
	   top/bottom margin, since the grid's own `gap` handles spacing here. */
	.article-sidebar-card { margin: 0; }

	.article-toc__link { font-size: 15px; min-height: 46px; padding: 10px 8px; }
	.article-toc__number { width: 28px; height: 28px; min-width: 28px; font-size: 13.5px; }

}
