/*
Theme Name: Leading Dental
Template: generatepress
Description: 嶺先牙醫 child theme on GeneratePress.
Version: 0.1.0
Text Domain: leading
*/

:root {
	--brand: #71dbd4;
	--brand-ink: #0f6f69;
	--navy: #103d62;
	--navy-2: #175b91;
	--text: #3a4450;
	--muted: #6b7682;
	--line: #e3e8ec;
	--soft: #f4f9fa;
	--radius: 10px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body {
	font-family: var(--font);
	color: var(--text);
	line-height: 1.85;
	background: #fff;
}

h1, h2, h3, h4 {
	color: var(--navy);
	line-height: 1.4;
	font-weight: 700;
}

a { color: var(--navy-2); }
a:hover { color: var(--brand-ink); }

/* ---------- Top bar: hours + phone ---------- */
.ld-topbar {
	background: var(--navy);
	color: #dfe9f1;
	font-size: 14px;
}
.ld-topbar .inside-topbar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	justify-content: space-between;
	padding: 6px 20px;
	max-width: 1200px;
	margin: 0 auto;
}
.ld-topbar a { color: #fff; text-decoration: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-logo img { max-height: 44px; width: auto; }
.main-navigation .main-nav ul li a { font-weight: 600; color: var(--navy); }
.main-navigation .main-nav ul li.ld-cta > a {
	background: var(--brand);
	color: var(--navy);
	border-radius: 999px;
	padding-left: 22px;
	padding-right: 22px;
	line-height: 40px;
	margin: 10px 0 10px 10px;
}

/* ---------- Article ---------- */
.single .entry-content img { border-radius: var(--radius); }
.entry-content h2 {
	font-size: 1.5rem;
	margin-top: 2em;
	padding-left: 12px;
	border-left: 4px solid var(--brand);
}
.ld-byline {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	font-size: 14px;
	color: var(--muted);
	margin: 8px 0 24px;
}
.ld-byline a { color: var(--navy-2); }

/* ---------- Cards / archives ---------- */
.ld-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}
.ld-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: #fff;
}
.ld-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.ld-card .ld-card-body { padding: 14px 16px 18px; }
.ld-card h3 { font-size: 1.05rem; margin: 0; }
.ld-card h3 a { color: var(--navy); text-decoration: none; }
.ld-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 28px; }
.ld-filter button { border: 1px solid var(--brand); background: #fff; color: var(--navy); padding: 8px 18px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.ld-filter button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.ld-card-noimg { display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9; background: var(--soft); }
.ld-card .ld-card-noimg img { width: 45%; aspect-ratio: auto; object-fit: contain; opacity: .85; }
.ld-search { max-width: 520px; margin: 0 auto 16px; }
.ld-search input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; }
.ld-search input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.ld-empty { text-align: center; color: var(--muted); margin: 24px 0; }
.ld-more-wrap { text-align: center; margin: 32px 0 8px; }
.ld-more { border: 1px solid var(--brand); background: #fff; color: var(--navy); padding: 10px 28px; border-radius: 4px; font-size: 15px; cursor: pointer; }
.ld-more:hover { background: var(--brand); color: #fff; }
.ld-card-excerpt { font-size: 14px; color: var(--muted); margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- YouTube facade (loads iframe only on click) ---------- */
.ld-yt {
	position: relative;
	aspect-ratio: 16/9;
	border-radius: var(--radius);
	overflow: hidden;
	background: #000;
	cursor: pointer;
	margin-bottom: 24px;
}
.ld-yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.ld-yt button {
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 50px;
	border: 0;
	border-radius: 12px;
	background: #e62117;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
}
.ld-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Clinic illustrations restored from the old articles ---------- */
.ld-fig { margin: 0 0 24px; }
.ld-fig img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--radius); }
.ld-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 8px; }
.ld-figs .ld-fig { margin: 0; }
.ld-figs .ld-fig img { border: 1px solid var(--line); }
.ld-figs-note { font-size: 13px; color: var(--muted); margin: 0 0 24px; }

/* ---------- Doctors ---------- */
.ld-doctor {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 32px;
	padding: 32px 0;
	border-bottom: 1px solid var(--line);
}
.ld-doctor img { border-radius: var(--radius); width: 100%; height: auto; }
.ld-doctor h2 { margin: 0 0 4px; border: 0; padding: 0; }
.ld-badges { display: flex; gap: 6px; margin-bottom: 12px; }
.ld-badge {
	font-size: 12px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--soft);
	color: var(--brand-ink);
	border: 1px solid var(--brand);
}
@media (max-width: 640px) {
	.ld-doctor { grid-template-columns: 1fr; }
	.ld-doctor img { max-width: 240px; }
}

/* ---------- Before / after ---------- */
.ld-ba {
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
	border-radius: var(--radius);
	--pos: 50%;
}
.ld-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ld-ba .ld-ba-after { clip-path: inset(0 0 0 var(--pos)); }
.ld-ba input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: ew-resize;
	margin: 0;
}
.ld-ba::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos);
	width: 3px;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0,0,0,.15);
	pointer-events: none;
}
.ld-ba-label {
	position: absolute;
	top: 10px;
	z-index: 2;
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 4px;
	background: rgba(16,61,98,.8);
	color: #fff;
	pointer-events: none;
}

/* ---------- FAQ ---------- */
.ld-faq details {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	margin-bottom: 12px;
	background: #fff;
}
.ld-faq summary {
	padding: 14px 18px;
	font-weight: 600;
	color: var(--navy);
	cursor: pointer;
}
.ld-faq details > div { padding: 0 18px 14px; }

/* ---------- Evidence page ---------- */
.ld-evidence-summary {
	background: var(--soft);
	border-left: 4px solid var(--brand);
	padding: 16px 20px;
	border-radius: 0 var(--radius) var(--radius) 0;
	margin-bottom: 28px;
}
.ld-evidence-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ld-evidence-table th, .ld-evidence-table td {
	border-bottom: 1px solid var(--line);
	padding: 10px 8px;
	vertical-align: top;
	text-align: left;
}
.ld-evidence-table th { color: var(--navy); background: var(--soft); }
.ld-level {
	display: inline-block;
	font-size: 12px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--navy);
	color: #fff;
	white-space: nowrap;
}
.ld-evidence-link {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin: 24px 0 8px;
	padding: 10px 16px;
	border: 1px solid var(--brand);
	border-radius: var(--radius);
	background: var(--soft);
	text-decoration: none;
	font-weight: 600;
}
@media (max-width: 640px) {
	.ld-evidence-table thead { display: none; }
	.ld-evidence-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
	.ld-evidence-table td { display: block; border: 0; padding: 4px 0; }
}

/* ---------- Floating contact ---------- */
.ld-float {
	position: fixed;
	right: 16px;
	bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	z-index: 50;
}
.ld-float a {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.ld-float .ld-line { background: #06c755; }
.ld-float .ld-fb { background: #0084ff; }
.ld-float .ld-tel { background: var(--navy); }

/* ---------- Footer ---------- */
.ld-footer {
	background: var(--navy);
	color: #cfdbe6;
	padding: 40px 20px 24px;
	font-size: 15px;
}
.ld-footer .inside {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}
.ld-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 10px; }
.ld-footer a { color: #fff; }
.ld-footer table { border: 0; margin: 0; }
.ld-footer td { border: 0; padding: 2px 12px 2px 0; }

/* ---------- Front page fixes ---------- */
html, body { overflow-x: clip; }
.main-navigation,
.main-navigation ul ul { background: #fff; }
.main-navigation .main-nav ul li:not(.ld-cta) a { color: var(--navy); }
.main-navigation .main-nav ul li:not(.ld-cta) a:hover { color: var(--brand-ink); background: transparent; }
.menu-toggle { color: var(--navy); }
.main-navigation .main-nav ul li[class*="current-menu-"]:not(.ld-cta) > a { background: transparent; color: var(--brand-ink); box-shadow: inset 0 -3px 0 var(--brand); }

/* ---------- Mobile ---------- */
.main-navigation .menu-toggle,
.main-navigation .menu-toggle:hover,
.main-navigation .menu-toggle:focus { color: var(--navy); background: transparent; font-weight: 600; }
@media (max-width: 768px) {
	.ld-topbar .ld-address { display: none; }
	.ld-topbar .inside-topbar { justify-content: center; padding: 4px 16px; }
	.ld-float { right: 10px; bottom: 10px; gap: 8px; }
	.ld-float a { width: 44px; height: 44px; font-size: 11px; }
	.site-content { padding-bottom: 60px; }
}
@media (min-width: 1025px) {
	.main-navigation .main-nav > ul > li > a { padding-left: 11px; padding-right: 11px; font-size: 15px; }
	.main-navigation .main-nav > ul > li.ld-cta > a { padding-left: 18px; padding-right: 18px; }
	.inside-header { max-width: 1240px; }
}

/* ---------- Front page (mirrors the old homepage sections) ---------- */
.home .entry-content > * { margin-top: 0; margin-bottom: 0; }
.home .entry-content h2 { margin-top: 0; padding: 0; border: 0; }
.ld-hero img { width: 100%; height: auto; display: block; }
.ld-section { padding: 64px 20px; }
.ld-section-soft { background: var(--soft); }
.ld-title { font-size: 2rem; margin-bottom: 36px; }
.ld-title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 14px auto 0;
	background: var(--brand);
}
.ld-title-left { font-size: 2rem; }
.ld-accent { color: var(--brand-ink); }
.ld-more a { font-weight: 600; text-decoration: none; color: var(--brand-ink); }

.ld-services {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 0;
	border-radius: var(--radius);
	overflow: hidden;
}
.ld-service {
	position: relative;
	min-height: 280px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px;
	text-decoration: none;
	color: var(--text);
}
.ld-service h3 { margin: 0 0 8px; font-size: 1.35rem; }
.ld-service p { margin: 0 0 12px; }
.ld-service span { color: var(--brand-ink); font-weight: 600; }
.ld-service-plain { background: #eef2f4; text-align: center; align-items: center; }
.ld-service-plain:hover { background: var(--brand); }
.ld-service-image { padding: 0; overflow: hidden; }
.ld-service-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ld-service-image > div {
	position: relative;
	margin-left: auto;
	width: 50%;
	padding: 32px;
	text-align: center;
	background: rgba(255,255,255,.88);
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 280px;
}
/* old layout: plain | image  /  image | plain */
.ld-services > :nth-child(3) { order: 4; }
.ld-services > :nth-child(4) { order: 3; }

.ld-banner .ld-banner-text { font-size: 2.2rem; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.ld-banner .wp-block-cover__inner-container { width: auto; max-width: 480px; margin-right: 8%; }
.ld-btn .wp-block-button__link { background: var(--navy); color: #fff; border-radius: 999px; padding: 12px 32px; }

.ld-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ld-trust-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--soft);
	border: 2px solid var(--brand);
	color: var(--brand-ink);
	font-size: 26px;
	margin-bottom: 14px;
}
.ld-trust h3 { font-size: 1.1rem; margin-bottom: 8px; }

.ld-case-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ld-case-strip img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }

.ld-post-scroller {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 48px) / 3);
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 12px;
}
.ld-post-scroller .ld-card { scroll-snap-align: start; }
.ld-post-scroller time { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.ld-post-scroller time b { color: var(--brand-ink); font-size: 18px; }

@media (max-width: 768px) {
	.ld-section { padding: 44px 16px; }
	.ld-title, .ld-title-left { font-size: 1.6rem; }
	.ld-services { grid-template-columns: 1fr; }
	.ld-services > * { order: 0 !important; }
	.ld-service-image > div { width: 100%; background: rgba(255,255,255,.85); }
	.ld-banner .ld-banner-text { font-size: 1.5rem; }
	.ld-banner .wp-block-cover__inner-container { margin-right: 0; }
	.ld-trust { grid-template-columns: 1fr; }
	.ld-case-strip { grid-template-columns: repeat(3, 1fr); }
	.ld-post-scroller { grid-auto-columns: 80%; }
}
.home .entry-content > * { margin-bottom: 0 !important; }
.ld-section { padding-top: 48px; padding-bottom: 48px; }
.ld-section > :last-child,
.ld-section .wp-block-columns { margin-bottom: 0; }
.ld-section .wp-block-column > :last-child { margin-bottom: 0; }
.ld-btn.wp-block-button .wp-block-button__link { background: var(--navy); color: #fff; }
.ld-btn.wp-block-button .wp-block-button__link:hover { background: var(--brand-ink); }
@media (min-width: 769px) {
	.ld-banner .wp-block-cover__inner-container { margin-right: 10%; }
}
@media (min-width: 769px) {
	.ld-banner.wp-block-cover { padding-right: 12%; }
	.ld-banner .wp-block-cover__inner-container { margin-right: 0; }
}
/* Old site's mobile services: four plain grey boxes, no photos. */
@media (max-width: 768px) {
	.ld-service { min-height: 0; padding: 28px 20px; background: #eef2f4; text-align: center; align-items: center; border-bottom: 1px solid #fff; }
	.ld-service-image img { display: none; }
	.ld-service-image > div { width: auto; min-height: 0; padding: 0; background: transparent; margin: 0; }
}

/* ---------- Booking form ---------- */
.ld-booking { max-width: 720px; }
.ld-booking fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 16px; }
.ld-booking legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.ld-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.ld-choice { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 15px; }
.ld-choice:has(input:checked) { border-color: var(--brand); background: var(--soft); color: var(--brand-ink); }
.ld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ld-booking label { display: block; font-weight: 600; color: var(--navy); }
.ld-booking input[type=text], .ld-booking input[type=tel], .ld-booking input[type=email], .ld-booking textarea { width: 100%; margin-top: 6px; border-radius: 8px; }
.ld-consent label { font-weight: 400; color: var(--text); font-size: 15px; }
.ld-submit { background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 12px 36px; font-size: 1rem; cursor: pointer; }
.ld-submit:disabled { opacity: .6; }
.ld-error { display: block; color: #c62828; font-size: 14px; margin-top: 4px; font-weight: 400; }
.ld-form-ok { padding: 16px 20px; background: var(--soft); border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600; }
.ld-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .ld-row { grid-template-columns: 1fr; gap: 0; } }

/* FAQ blocks inside articles/pages (same look as the FAQ archive) */
.entry-content details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; }
.entry-content details summary { padding: 14px 18px; font-weight: 600; color: var(--navy); cursor: pointer; }
.entry-content details > :not(summary) { padding: 0 18px; }
.ld-cite a { text-decoration: none; font-size: .8em; }

/* ---------- Internal project plan page ---------- */
.ld-plan-lead { font-size: 1.05rem; }
.ld-plan-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 32px; }
.ld-plan-stats div { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: center; background: var(--soft); }
.ld-plan-stats b { display: block; font-size: 2rem; color: var(--navy); line-height: 1.2; }
.ld-plan-stats span { font-size: 14px; color: var(--muted); }
.ld-check { list-style: none; margin: 0 0 28px; padding: 0; }
.ld-check li { position: relative; padding: 10px 12px 10px 40px; border-bottom: 1px solid var(--line); }
.ld-check li::before { position: absolute; left: 10px; top: 10px; width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ld-check li.done::before { content: "✓"; background: #2e7d32; color: #fff; }
.ld-check li.wait::before { content: "…"; background: #f0a500; color: #fff; }
.ld-check li.todo::before { content: ""; border: 2px solid #b0bec5; width: 16px; height: 16px; }
.ld-check li.done { color: var(--muted); }
.ld-check em { font-style: normal; font-size: 12px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--brand-ink); border: 1px solid var(--brand); white-space: nowrap; }
.ld-plan-note { color: var(--muted); font-size: 14px; }

.ld-asks details summary { cursor: pointer; list-style: none; }
.ld-asks details summary::-webkit-details-marker { display: none; }
.ld-asks details summary::after { content: "點開說明 ▾"; font-size: 12px; color: var(--navy-2); margin-left: 8px; white-space: nowrap; }
.ld-asks details[open] summary::after { content: "收合 ▴"; }
.ld-asks details > div { margin-top: 12px; padding: 14px 16px; background: var(--soft); border-radius: var(--radius); font-size: 15px; }
.ld-asks details > div ul { margin: 0 0 12px 1.2em; }
.ld-names { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 12px; background: #fff; }
.ld-names th, .ld-names td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.ld-names th { background: #eef4f6; color: var(--navy); }
.ld-asks details ul li { padding: 3px 0; border: 0; list-style: disc; }
.ld-asks details ul li::before { content: none; }
.ld-asks details ul { list-style: disc; }

/* Review replies */
.ld-reply { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ld-reply-title { font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.ld-asks .ld-reply-list { list-style: none; margin: 0 0 12px; }
.ld-asks .ld-reply-list li.ld-reply-item { list-style: none; background: #fff; border: 1px solid var(--line); border-left: 4px solid #f0a500; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; }
.ld-reply-meta { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.ld-reply label { display: block; font-weight: 600; color: var(--navy); font-size: 14px; }
.ld-reply textarea, .ld-reply input[type=text] { width: 100%; margin-top: 4px; border-radius: 6px; background: #fff; }
.ld-reply-row { display: flex; gap: 12px; align-items: flex-end; margin-top: 8px; }
.ld-reply-row label { flex: 1; }
.ld-reply button { background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 10px 24px; cursor: pointer; white-space: nowrap; }
.ld-asks > li.todo:has(.ld-reply-item)::before { content: "…"; background: #f0a500; border: 0; width: 20px; height: 20px; color: #fff; }
/* Claims research page */
.ld-claims h3 { margin-top: 2.2em; padding-top: 12px; border-top: 2px solid var(--line); }
.ld-claims blockquote { margin: 10px 0 14px; padding: 12px 16px; background: #eef8f0; border-left: 4px solid #2e7d32; border-radius: 0 var(--radius) var(--radius) 0; font-style: normal; color: var(--text); }
.ld-claims blockquote p { margin: 0; }
.ld-claims table { font-size: 14px; }
.ld-claims .ld-asks { list-style: none; padding: 0; margin: 12px 0 0; }

.ld-plan-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.ld-plan-nav a { padding: 6px 14px; border: 1px solid var(--brand); border-radius: 999px; background: var(--soft); color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 600; }
.ld-plan-nav a:hover { background: var(--brand); }

/* Reply log: one line per reply */
.ld-log { list-style: none; margin: 0; padding: 0; }
.ld-log li { border-bottom: 1px solid var(--line); }
.ld-log summary { display: flex; gap: 12px; align-items: baseline; padding: 10px 4px; cursor: pointer; white-space: nowrap; overflow: hidden; }
.ld-log .ld-log-time { color: var(--muted); font-size: 13px; }
.ld-log .ld-log-q { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--brand); color: var(--brand-ink); }
.ld-log .ld-log-excerpt { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.ld-log details > div { padding: 4px 8px 14px; }
@media (max-width: 640px) { .ld-log summary { flex-wrap: wrap; white-space: normal; } }
/* Two-way reply links */
.ld-count { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: #f0a500; color: #fff; margin: 0 6px; vertical-align: middle; }
.ld-log-context { font-size: 13px; color: var(--muted); background: #fff; border-left: 3px solid var(--brand); padding: 6px 10px; margin: 6px 0 10px; }
.ld-reply-meta a { font-size: 12px; }
@keyframes ld-flash { from { box-shadow: 0 0 0 4px #f0a500; background: #fff8e1; } to { box-shadow: 0 0 0 0 transparent; } }
.ld-flash { animation: ld-flash 2.5s ease-out; }

/* One-click decisions */
.ld-decide { justify-content: flex-start; }
.ld-reply .ld-btn-ok { background: #2e7d32; }
.ld-reply .ld-btn-change { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.ld-decision { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 999px; margin-right: 6px; }
.ld-decision-ok { background: #e8f5e9; color: #2e7d32; border: 1px solid #2e7d32; }
.ld-decision-change { background: #fff3e0; color: #e65100; border: 1px solid #e65100; }
.ld-count-ok { background: #2e7d32; }
.ld-asks > li.todo:has(.ld-approved)::before { content: "✓"; background: #2e7d32; border: 0; width: 20px; height: 20px; color: #fff; }
.ld-asks .ld-reply-list li.ld-reply-item:has(.ld-decision-ok) { border-left-color: #2e7d32; }
.ld-asks .ld-reply-list li.ld-reply-item:has(.ld-decision-change) { border-left-color: #e65100; }

/* Accessibility fixes (Lighthouse) */
.ld-float .ld-line { background: #007a33; }
.ld-float .ld-fb { background: #0058b8; }
.entry-content p a, .entry-content li a, .entry-content td a { text-decoration: underline; text-underline-offset: 2px; }
.site-logo img, .header-image { width: auto; height: 44px; max-height: none; }
.site-header .site-logo .header-image { width: auto; height: 44px; }
.ld-byline a { text-decoration: underline; text-underline-offset: 2px; }

.ld-draft-review { margin-top: 40px; padding: 20px; border: 2px dashed #f0a500; border-radius: var(--radius); background: #fffaf0; }
.ld-draft-review h2 { margin-top: 0; border: 0; padding: 0; }

.ld-flags { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: #fff3e0; color: #e65100; border: 1px solid #e65100; margin-left: 6px; }
.ld-flags-ok { background: #e8f5e9; color: #2e7d32; border-color: #2e7d32; }

.ld-decided { background: #e8f5e9; border-left: 4px solid #2e7d32; padding: 8px 12px; border-radius: 0 6px 6px 0; }

/* Videos an article was rewritten from */
.ld-related-videos ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.ld-related-videos li { margin: 0; }
.ld-related-video-title { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.ld-related-video-note { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: #555; background: #f6f8f8; border-left: 3px solid #5aa9a6; padding: 6px 10px; }

/* Signed-in reviewers: way back to the review round */
.ld-review-backbar { position: sticky; top: 0; z-index: 50; background: #fff8e1; border-bottom: 1px solid #f0d58c; padding: 8px 16px; font-size: 15px; text-align: center; }
.ld-review-backbar a { font-weight: 600; }

/* Review: multiple-choice answers are one tap each */
.ld-choices { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.ld-btn-choice { text-align: left; padding: 12px 14px; font-size: 16px; background: #fff; color: #1d4e4c; border: 2px solid #5aa9a6; border-radius: 8px; cursor: pointer; }
.ld-btn-choice:hover, .ld-btn-choice:focus { background: #e8f4f3; }
.ld-item-line { margin-bottom: 6px; }

/* Review: what to look at in this article */
.ld-review-top { background: #fff8e1; border: 2px solid #f0c24b; border-radius: 10px; padding: 14px 18px; margin: 0 0 24px; }
.ld-review-top-label { font-weight: 700; color: #8a5a00; margin: 0 0 6px; }
.ld-review-top p { margin: 0 0 8px; }
[data-review-mark] { background: #fff3c4; box-shadow: -6px 0 0 #f0c24b; scroll-margin-top: 80px; position: relative; }
p[data-review-mark]::before, li[data-review-mark]::before, details[data-review-mark]::before { content: attr(data-review-mark); display: block; font-size: 13px; font-weight: 700; color: #8a5a00; }
