/*
Theme Name: 嘉義市不動產建築開發商業同業公會
Description: Twenty Twenty-Five 子佈景主題。配色取自會徽：紫紅（花）＋金（外圈）。顏色、字型、按鈕在 theme.json；其餘樣式在本檔（functions.php 載入）。
Template: twentytwentyfive
Version: 1.5.5
Text Domain: cybbc
*/

:root {
	--cy-plum-900: #3d1230; /* top bar, footer, headings */
	--cy-plum-700: #7a1f52;
	--cy-brand: #bb2e77;    /* emblem flower: links, tags */
	--cy-brand-dark: #8f1f5a;
	--cy-gold: #d9b13b;     /* emblem ring: buttons, accents */
	--cy-tint: #faf3f7;     /* alternating section background */
	--cy-muted: #6b6b6b;
	--cy-line: #ecdde5;
}

/* ---------- Content basics ---------- */
.wp-block-post-content img {
	max-width: 100%;
	height: auto;
}

/* ---------- Top bar ---------- */
.cybbc-topbar {
	background: var(--cy-plum-900);
	color: #f3e6ee;
	font-size: 0.8125rem;
}
.cybbc-topbar .wp-block-group.alignwide {
	padding-block: 6px;
	gap: 6px 16px;
}
.cybbc-topbar p {
	margin: 0;
}
.cybbc-topbar strong {
	color: var(--cy-gold);
	font-weight: 600;
}
.cybbc-topbar a {
	color: inherit;
	text-decoration: none;
}
@media (max-width: 600px) {
	.cybbc-topbar__address {
		display: none;
	}
}

/* ---------- Header ---------- */
.cybbc-header {
	background: #fff;
	border-bottom: 1px solid var(--cy-line);
}
/* Logo is the 2084px original (custom_logo), so it stays sharp when large. On phones it leaves room for the menu button. */
.cybbc-header .wp-block-site-logo img {
	width: min(440px, calc(100vw - 100px));
	height: auto;
}
.cybbc-header .wp-block-navigation-item__content {
	padding-block: 4px;
	border-bottom: 2px solid transparent;
}
.cybbc-header .wp-block-navigation-item__content:hover {
	color: var(--cy-brand);
}
/* Only submenu parents light up for a current child; old pages are children of 首頁, which must not light up. */
.cybbc-header .current-menu-item > .wp-block-navigation-item__content,
.cybbc-header .has-child.current-menu-ancestor > .wp-block-navigation-item__content {
	border-bottom-color: var(--cy-gold);
	color: var(--cy-brand-dark);
	font-weight: 600;
}

/* Mid widths (tablets, small laptops): smaller logo and menu keep the 7 items on one line; below 1000px the
   whole menu moves under the logo instead of single items dropping to a second line. */
@media (min-width: 1000px) and (max-width: 1180px) {
	.cybbc-header .wp-block-site-logo img {
		width: 330px;
	}
}
@media (min-width: 600px) and (max-width: 1180px) {
	.cybbc-header .wp-block-navigation,
	.cybbc-header .wp-block-navigation__container {
		gap: 0.3em 1.1em;
		font-size: 0.9375rem;
	}
}
@media (min-width: 600px) and (max-width: 999px) {
	.cybbc-header .wp-block-group.alignwide {
		flex-wrap: wrap;
		row-gap: 6px;
	}
	.cybbc-header .wp-block-group.alignwide > .wp-block-group {
		flex-basis: 100%;
		justify-content: flex-start;
	}
	.cybbc-header .wp-block-navigation {
		justify-content: flex-start;
	}
}

/* Phone menu (the overlay the ☰ button opens below 600px): left-aligned full-width rows with dividers.
   The group parents (關於公會, 會員服務) are "#" links, so they become small labels over their pages.
   Selectors start with the content wrapper to outrank core's overlay rules. */
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	padding-top: 48px;
}
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
	align-items: stretch;
	gap: 0;
}
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container > .wp-block-navigation-item {
	border-bottom: 1px solid var(--cy-line);
}
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
	display: block;
	padding: 14px 4px;
	border-bottom: 0;
	font-size: 1.0625rem;
	text-align: left;
	text-decoration: none;
}
/* Opening the menu moves focus to 首頁; show the focus ring only for keyboard users, not after a tap. */
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:focus:not(:focus-visible) {
	outline: none;
}
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item:not(.current-menu-item) > .wp-block-navigation-item__content:focus:not(:focus-visible) {
	color: inherit;
}
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child > .wp-block-navigation-item__content {
	padding: 16px 4px 2px;
	color: var(--cy-muted);
	font-size: 0.8125rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	pointer-events: none;
}
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
	min-width: 0;
	padding: 0 0 6px;
	gap: 0;
}
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 10px 4px 10px 16px;
}
/* Current page: a gold bar on the left instead of the desktop underline. */
.cybbc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .current-menu-item > .wp-block-navigation-item__content {
	padding-left: 16px;
	box-shadow: inset 3px 0 0 var(--cy-gold);
}

/* ---------- Footer ---------- */
.cybbc-footer {
	background: var(--cy-plum-900);
	color: #e9d9e2;
	font-size: 0.875rem;
	padding-top: 44px;
}
.cybbc-footer a {
	color: #fff;
	text-decoration: none;
}
.cybbc-footer a:hover {
	color: var(--cy-gold);
}
.cybbc-footer p {
	margin: 0.3em 0;
}
.cybbc-footer h2 {
	color: var(--cy-gold);
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0 0 10px;
}
.cybbc-footer__brand {
	gap: 12px;
	align-items: center;
	margin-bottom: 10px;
}
.cybbc-footer__brand p {
	color: #fff;
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.4;
}
.cybbc-footer__brand img {
	background: #fff;
	border-radius: 50%;
	padding: 3px;
}
.cybbc-footer__brand figure {
	margin: 0;
}
.cybbc-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cybbc-footer li {
	margin: 0.3em 0;
}
.cybbc-footer__copy {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #cbb3c1;
	font-size: 0.78rem;
	padding: 14px 0;
	margin-top: 24px !important;
}
@media (max-width: 600px) {
	.cybbc-footer__copy span {
		display: block;
	}
	.cybbc-footer__copy .cybbc-footer__sep {
		display: none;
	}
}

/* ---------- Home ---------- */
.wp-site-blocks > main.cybbc-home,
.wp-site-blocks:has(> main.cybbc-home) > footer {
	margin-block-start: 0;
}
.cybbc-home > * {
	margin-block: 0;
}

/* Hero: emblem plum gradient with a faint diagonal texture */
.cybbc-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(120deg, var(--cy-plum-900), var(--cy-plum-700) 60%, var(--cy-brand));
	color: #fff;
	padding-top: 72px;
	padding-bottom: 120px;
}
.cybbc-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 22px);
	pointer-events: none;
}
.cybbc-hero.cybbc-hero > * {
	position: relative;
	z-index: 1;
	max-width: var(--wp--style--global--wide-size);
}
.cybbc-hero__kicker {
	margin: 0;
	color: var(--cy-gold);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}
.cybbc-hero h1 {
	color: #fff;
	margin: 0.25em 0 0.3em;
	font-size: clamp(1.875rem, 4vw, 2.75rem);
	font-weight: 700;
	text-wrap: balance;
}
.cybbc-hero p:not(.cybbc-hero__kicker) {
	margin: 0 0 28px;
	font-size: 1.125rem;
	color: #f6e9f0;
}
.cybbc-hero .is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.cybbc-hero .is-style-outline .wp-block-button__link:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

/* Quick links: cards overlapping the hero's bottom edge */
.cybbc-home > .cybbc-quick {
	margin-block-start: -64px;
	position: relative;
	z-index: 2;
}
.cybbc-quick.cybbc-quick > * {
	max-width: var(--wp--style--global--wide-size);
}
.cybbc-quick__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.cybbc-quick__grid li {
	margin: 0;
}
.cybbc-quick__grid a {
	display: block;
	box-sizing: border-box;
	height: 100%;
	padding: 18px 18px 16px;
	background: #fff;
	border-top: 4px solid var(--cy-gold);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(61, 18, 48, 0.12);
	color: inherit;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}
.cybbc-quick__grid a:hover,
.cybbc-quick__grid a:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(61, 18, 48, 0.18);
}
.cybbc-quick__grid strong {
	display: block;
	color: var(--cy-plum-900);
	font-size: 1.0625rem;
	font-weight: 700;
}
.cybbc-quick__grid span {
	color: var(--cy-muted);
	font-size: 0.8125rem;
}

/* Sections */
.cybbc-home-section {
	padding-top: 56px;
	padding-bottom: 56px;
}
.cybbc-home-section--tint {
	background: var(--cy-tint);
}
.cybbc-section-head {
	align-items: baseline;
	margin-bottom: 14px;
}
.cybbc-section-head h2 {
	margin: 0;
	font-size: 1.625rem;
}
.cybbc-section-head h2::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 0.85em;
	margin-right: 10px;
	background: var(--cy-gold);
	border-radius: 2px;
	vertical-align: -0.05em;
}
.cybbc-section-head p {
	margin: 0;
	white-space: nowrap;
	font-size: 1rem;
}
.cybbc-section-head a {
	font-weight: 600;
	text-decoration: none;
}

/* Latest news: date, category chip, title */
.cybbc-news-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cybbc-news-list > li {
	margin: 0;
	padding: 14px 4px;
	border-bottom: 1px solid var(--cy-line);
}
.cybbc-news-list .wp-block-group {
	gap: 16px;
	align-items: baseline;
}
.cybbc-news-list .wp-block-post-date {
	flex: none;
	width: 6.5em;
	color: var(--cy-muted);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}
.cybbc-news-list .wp-block-post-terms {
	flex: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	width: 7.5em; /* titles line up whichever category tag is shown */
}
.cybbc-news-list .wp-block-post-terms a,
.cybbc-post-meta .wp-block-post-terms a {
	padding: 2px 10px;
	border-radius: 999px;
	background: #f6e3ee;
	color: var(--cy-brand-dark);
	font-size: 0.75rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.cybbc-news-list .wp-block-post-terms a[href*="/category/meet/"],
.cybbc-post-meta .wp-block-post-terms a[href*="/category/meet/"] {
	background: #f8efcf;
	color: #7a5d00;
}
.cybbc-news-list .wp-block-post-terms a[href*="/category/uncategorized/"],
.cybbc-post-meta .wp-block-post-terms a[href*="/category/uncategorized/"] {
	display: none;
}
.cybbc-news-list .wp-block-post-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
}
.cybbc-news-list .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
.cybbc-news-list .wp-block-post-title a:hover {
	color: var(--cy-brand);
}

/* Activity photos */
.cybbc-photo-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.cybbc-photo-grid > li {
	margin: 0;
	overflow: hidden;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(61, 18, 48, 0.08);
}
.cybbc-photo-grid .wp-block-post-featured-image {
	margin: 0;
}
.cybbc-photo-grid .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	object-fit: cover;
}
.cybbc-photo-grid__text {
	padding: 12px 16px 16px;
}
.cybbc-photo-grid__text .wp-block-post-date {
	color: var(--cy-muted);
	font-size: 0.8125rem;
}
.cybbc-photo-grid__text .wp-block-post-title {
	margin: 0.2em 0 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}
.cybbc-photo-grid__text .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
.cybbc-photo-grid__text .wp-block-post-title a:hover {
	color: var(--cy-brand);
}

@media (max-width: 999px) {
	.cybbc-quick__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 600px) {
	.cybbc-hero {
		padding-top: 44px;
		padding-bottom: 96px;
	}
	.cybbc-quick__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.cybbc-news-list .wp-block-group {
		flex-wrap: wrap;
		gap: 4px 10px;
	}
	.cybbc-news-list .wp-block-post-terms {
		width: auto;
	}
	.cybbc-news-list .wp-block-post-title {
		flex-basis: 100%;
	}
	.cybbc-photo-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Inner pages: title band with breadcrumbs ---------- */
.wp-site-blocks > main.cybbc-page {
	margin-block-start: 0;
}
.cybbc-page > * {
	margin-block: 0;
}
/* Title band on every inner page: a short version of the homepage hero (owner chose this 2026-11-19). */
.cybbc-band {
	position: relative;
	overflow: hidden;
	background: linear-gradient(120deg, var(--cy-plum-900), var(--cy-plum-700) 60%, var(--cy-brand));
	color: #fff;
	padding-top: 34px;
	padding-bottom: 30px;
}
.cybbc-band::after {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 22px);
	pointer-events: none;
}
.cybbc-band > * {
	position: relative;
	z-index: 1;
}
.cybbc-band .wp-block-post-title,
.cybbc-band h1,
.cybbc-band .wp-block-query-title {
	color: #fff;
}
.cybbc-band .wp-block-breadcrumbs {
	margin: 0;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.8125rem;
}
.cybbc-band .wp-block-breadcrumbs a {
	color: #e8c766;
	text-decoration: none;
}
.cybbc-band .wp-block-breadcrumbs a:hover {
	text-decoration: underline;
}
.cybbc-band .wp-block-post-title {
	margin: 0.2em 0 0;
	font-size: clamp(1.75rem, 3.5vw, 2.25rem);
	font-weight: 700;
	text-wrap: balance;
}
.cybbc-page__body {
	padding-top: 32px;
	padding-bottom: 64px;
}
/* Pages whose content is wide (member directory, board) get a wide band so the title lines up with it. */
.cybbc-directory .cybbc-band > *,
body:has(.cybbc-board) .cybbc-band > *,
body:has(.cybbc-roster) .cybbc-band > * {
	max-width: var(--wp--style--global--wide-size);
}

/* ---------- News lists, archives, single posts ---------- */
.cybbc-band--wide > * {
	max-width: var(--wp--style--global--wide-size);
}
.cybbc-band h1,
.cybbc-band .wp-block-query-title {
	margin: 0.2em 0 0;
	font-size: clamp(1.75rem, 3.5vw, 2.25rem);
	font-weight: 700;
	text-wrap: balance;
}
.cybbc-band .wp-block-term-description {
	margin: 0.5em 0 0;
	color: rgba(255, 255, 255, 0.8);
}
.cybbc-band .cybbc-post-meta .wp-block-post-date {
	color: rgba(255, 255, 255, 0.75);
}
.cybbc-band .wp-block-search {
	margin-top: 12px;
}
/* Keep the search box left-aligned with the title: limit the inner wrapper, not the block. */
.cybbc-band .wp-block-search__inside-wrapper,
.cybbc-404 .wp-block-search__inside-wrapper {
	max-width: 32rem;
}

/* Category filter: 全部 + category list as chips */
.cybbc-filter {
	gap: 8px;
	margin-bottom: 20px;
}
.cybbc-filter p,
.cybbc-filter ul {
	margin: 0;
}
.cybbc-filter ul {
	display: contents; /* category chips flow on the same line as 全部 */
	list-style: none;
}
.cybbc-filter li {
	margin: 0;
}
.cybbc-filter li.cat-item-1 {
	display: none; /* 未分類 */
}
.cybbc-filter a,
.cybbc-jump a {
	display: inline-block;
	padding: 4px 14px;
	border: 1px solid var(--cy-line);
	border-radius: 999px;
	background: #fff;
	color: var(--cy-plum-900);
	font-size: 0.875rem;
	text-decoration: none;
}
.cybbc-filter a:hover,
.cybbc-jump a:hover {
	border-color: var(--cy-brand);
	color: var(--cy-brand);
}
.cybbc-filter .current-cat > a,
body.blog .cybbc-filter__all a {
	background: var(--cy-brand);
	border-color: var(--cy-brand);
	color: #fff;
}

/* Pagination */
.wp-block-query-pagination {
	margin-top: 28px;
	gap: 6px;
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-block;
	min-width: 2.2em;
	padding: 4px 10px;
	border-radius: 6px;
	text-align: center;
	text-decoration: none;
}
.wp-block-query-pagination .page-numbers.current {
	background: var(--cy-plum-900);
	color: #fff;
}

/* Single post: date + category chips in the band, prev/next and back link */
.cybbc-post-meta {
	gap: 10px;
	align-items: center;
	margin-top: 10px;
}
.cybbc-post-meta .wp-block-post-date {
	color: var(--cy-muted);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}
.cybbc-post-meta .wp-block-post-terms {
	display: flex;
	gap: 6px;
}
.cybbc-post-nav {
	gap: 12px;
	margin-top: 40px !important;
	padding-top: 20px;
	border-top: 1px solid var(--cy-line);
	font-size: 0.9375rem;
}
.cybbc-post-nav a {
	text-decoration: none;
}
.cybbc-post-back {
	margin-top: 16px !important;
	font-size: 0.9375rem;
}
.cybbc-post-back a {
	text-decoration: none;
	font-weight: 600;
}

/* ---------- 理監事名錄 (page content uses .cybbc-board) ---------- */
.cybbc-board__heading {
	margin: 2em 0 0.75em;
}
.cybbc-board__heading:first-child {
	margin-top: 0;
}
.cybbc-board__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr));
	gap: 24px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 1rem;
}
.cybbc-board__card {
	margin: 0;
	text-align: center;
	line-height: 1.4;
}
.cybbc-board__card img {
	display: block;
	width: 100%;
	max-width: 150px;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	margin: 0 auto 8px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.05);
}
.cybbc-board__role,
.cybbc-board__company {
	display: block;
	font-size: 0.8125em;
	opacity: 0.7;
}
.cybbc-board__name {
	display: block;
	font-weight: 600;
}
@media (max-width: 600px) {
	.cybbc-board__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px 10px;
		font-size: 0.9375rem;
	}
}

/* ---------- 同業連帶擔保核准名冊 (page content: core table block with class .cybbc-roster) ---------- */
.cybbc-roster__intro {
	max-width: var(--wp--style--global--wide-size) !important; /* line up with the wide table */
	color: var(--cy-muted);
}
.cybbc-roster {
	font-size: 0.9375rem;
	line-height: 1.5;
}
.cybbc-roster th,
.cybbc-roster td {
	border: 0;
}
@media (min-width: 601px) {
	.cybbc-roster {
		overflow: visible; /* core sets overflow-x:auto, which would stop the sticky header */
	}
	.cybbc-roster thead {
		border: 0;
	}
	.cybbc-roster th {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		padding: 10px 12px;
		background: var(--cy-plum-900);
		color: #fff;
		font-weight: 600;
		text-align: left;
		white-space: nowrap;
	}
	.cybbc-roster td {
		padding: 9px 12px;
		border-bottom: 1px solid var(--cy-line);
		vertical-align: top;
	}
	.cybbc-roster tbody tr:nth-child(even) td {
		background: var(--cy-tint);
	}
	.cybbc-roster tbody tr:hover td {
		background: #f3e2ec;
	}
	.cybbc-roster th:first-child,
	.cybbc-roster td:first-child {
		width: 1%;
		text-align: center;
		font-variant-numeric: tabular-nums;
	}
	.cybbc-roster td:first-child {
		color: var(--cy-muted);
	}
	.cybbc-roster td:nth-child(-n+4) {
		white-space: nowrap;
	}
}
/* Phones: one card per row — 編號 and 等級 on top, the other columns as labelled lines. */
@media (max-width: 600px) {
	.cybbc-roster thead {
		display: none;
	}
	.cybbc-roster table,
	.cybbc-roster tbody {
		display: block;
	}
	.cybbc-roster tr {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px 10px;
		margin-bottom: 12px;
		padding: 12px 14px;
		border: 1px solid var(--cy-line);
		border-radius: 8px;
	}
	.cybbc-roster td {
		display: flex;
		gap: 10px;
		width: 100%;
		padding: 0;
	}
	/* ponytail: labels repeat the table header by column position; update them if the columns change. */
	.cybbc-roster td::before {
		flex: 0 0 5.5em;
		color: var(--cy-muted);
		font-size: 0.8125rem;
		line-height: 1.85;
	}
	.cybbc-roster td:nth-child(1)::before { content: "編號"; flex-basis: auto; }
	.cybbc-roster td:nth-child(2)::before { content: "擔保公司"; }
	.cybbc-roster td:nth-child(3)::before { content: "被擔保公司"; }
	.cybbc-roster td:nth-child(5)::before { content: "公司個案"; }
	.cybbc-roster td:nth-child(6)::before { content: "建照號碼"; }
	.cybbc-roster td:nth-child(1),
	.cybbc-roster td:nth-child(4) {
		order: -1;
		width: auto;
	}
	.cybbc-roster td:nth-child(1) {
		gap: 6px;
		font-weight: 700;
		color: var(--cy-plum-900);
	}
	.cybbc-roster td:nth-child(4) {
		padding: 1px 10px;
		border-radius: 999px;
		background: var(--cy-tint);
		color: var(--cy-brand-dark);
		font-size: 0.8125rem;
	}
}

/* ---------- 公會簡介 (page content wrapped in .cybbc-about) ---------- */
.cybbc-about h2,
.cybbc-downloads h2,
.cybbc-laws h2 {
	margin: 2.2em 0 0.8em;
	padding-left: 12px;
	border-left: 4px solid var(--cy-gold);
	font-size: 1.375rem;
	line-height: 1.35;
}
.cybbc-about > h2:first-child,
.cybbc-downloads > h2:first-child,
.cybbc-laws > h2:first-child {
	margin-top: 0;
}
.cybbc-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 1.5em;
	padding: 0;
	list-style: none;
}
.cybbc-facts li {
	margin: 0;
	padding: 14px 10px;
	border-radius: 8px;
	background: var(--cy-tint);
	color: var(--cy-muted);
	font-size: 0.875rem;
	text-align: center;
}
.cybbc-facts strong {
	display: block;
	color: var(--cy-brand-dark);
	font-size: 1.375rem;
	line-height: 1.35;
}
/* One collapsible card per board term */
.cybbc-about .cybbc-term {
	margin: 0 0 10px;
	border: 1px solid var(--cy-line);
	border-radius: 8px;
	overflow: hidden;
}
.cybbc-term summary {
	padding: 12px 16px;
	font-size: 1rem;
}
.cybbc-term summary strong {
	color: var(--cy-plum-900);
}
.cybbc-term[open] summary {
	border-bottom: 1px solid var(--cy-line);
	background: var(--cy-tint);
}
.cybbc-term > .cybbc-term__table {
	margin: 0;
	font-size: 1rem;
}
.cybbc-term__table td {
	padding: 8px 16px;
	border: 0;
	border-bottom: 1px solid var(--cy-line);
	vertical-align: top;
}
.cybbc-term__table tr:last-child td {
	border-bottom: 0;
}
.cybbc-term__table td:first-child {
	width: 5.5em;
	color: var(--cy-muted);
	white-space: nowrap;
}
.cybbc-about .cybbc-about__card {
	margin-top: 2em;
	padding: 20px 24px;
	border-radius: 8px;
	background: var(--cy-tint);
}
.cybbc-about__card h2 {
	margin-top: 0;
}
@media (max-width: 600px) {
	.cybbc-facts strong {
		font-size: 1.125rem;
	}
	.cybbc-term__table td {
		padding: 8px 12px;
	}
	.cybbc-term__table td:first-child {
		width: 4.5em;
	}
	.cybbc-about .cybbc-about__card {
		padding: 16px 18px;
	}
}

/* ---------- 檔案下載 (page content wrapped in .cybbc-downloads) and file rows everywhere ---------- */
.cybbc-jump {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}
.cybbc-jump li {
	margin: 0;
}
.cybbc-downloads h2,
.cybbc-laws h2 {
	scroll-margin-top: 16px;
}
/* Core File block as one row: type badge, title, download button (also the file rows in old posts). */
.wp-block-post-content .wp-block-file {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--cy-line);
	font-size: 1rem;
}
.wp-block-file > a:not(.wp-block-file__button) {
	display: flex;
	flex: 1;
	align-items: baseline;
	gap: 10px;
	color: inherit;
	line-height: 1.5;
	text-decoration: none;
}
.wp-block-file > a:not(.wp-block-file__button):hover {
	color: var(--cy-brand);
}
/* ponytail: badge from the file extension in the link; add a rule here if a new file type shows up. */
.wp-block-file > a:not(.wp-block-file__button)::before {
	content: "檔案";
	flex: none;
	width: 3.4em;
	padding: 2px 0;
	border-radius: 4px;
	background: var(--cy-muted);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
}
.wp-block-file > a:not(.wp-block-file__button)[href$=".pdf" i]::before {
	content: "PDF";
	background: #c0392b;
}
.wp-block-file > a:not(.wp-block-file__button)[href$=".doc" i]::before,
.wp-block-file > a:not(.wp-block-file__button)[href$=".docx" i]::before,
.wp-block-file > a:not(.wp-block-file__button)[href$=".odt" i]::before {
	content: "DOC";
	background: #2b579a;
}
.wp-block-file > a:not(.wp-block-file__button)[href$=".ppt" i]::before,
.wp-block-file > a:not(.wp-block-file__button)[href$=".pptx" i]::before {
	content: "PPT";
	background: #c43e1c;
}
.wp-block-file > a:not(.wp-block-file__button)[href$=".xls" i]::before,
.wp-block-file > a:not(.wp-block-file__button)[href$=".xlsx" i]::before {
	content: "XLS";
	background: #217346;
}
.wp-block-file .wp-block-file__button {
	flex: none;
	margin-left: 0;
	padding: 4px 16px;
	border-radius: 999px; /* core's file-block CSS only loads where a File block renders, not in old posts */
	font-size: 0.875rem;
	white-space: nowrap;
}
.cybbc-older {
	margin-top: 10px;
}
.cybbc-older summary {
	padding: 8px 0;
	color: var(--cy-brand);
	font-size: 0.9375rem;
	cursor: pointer;
}

/* ---------- 相關法令 (page content wrapped in .cybbc-laws) ---------- */
.cybbc-laws__intro {
	margin: 0 0 16px;
	color: var(--cy-muted);
	font-size: 0.9375rem;
}
.cybbc-law-list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 1rem;
}
.cybbc-law-list li {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--cy-line);
	line-height: 1.5;
}
.cybbc-law-list a {
	color: inherit;
	text-decoration: none;
}
.cybbc-law-list a:hover {
	color: var(--cy-brand);
}
.cybbc-law-list a::after {
	content: "↗";
	margin-left: 0.35em;
	color: var(--cy-muted);
	font-size: 0.8em;
}

/* Body text uses line-height 1.75 (theme.json); buttons keep a compact line. */
.wp-element-button,
.wp-block-button__link {
	line-height: 1.4;
}

/* ---------- Old classic posts ---------- */
/* Fixed-width tables scroll sideways on phones instead of overflowing the page. */
.wp-block-post-content > table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}
/* Inline font families from the old editor follow the site font. */
.wp-block-post-content [style*="font-family"] {
	font-family: inherit !important;
}

/* ---------- 建築嘉義會刊 (page gallery .cybbc-journal) ---------- */
.cybbc-journal__hint {
	color: var(--cy-muted);
	font-size: 0.9375rem;
}
.cybbc-journal img {
	border: 1px solid var(--cy-line);
}

/* ---------- 404 ---------- */
.cybbc-404 .wp-block-search {
	margin: 20px 0 24px;
}
