/* Fontsco theme — layout overrides & page-specific styles on top of fontsco-core.css */

/* ---------- Single font page ---------- */
.fc-single { padding-top: 24px; }
.fc-single__carousel { margin-bottom: 40px; }
.fc-single__top { display: grid; grid-template-columns: 1fr 273px; gap: 48px; align-items: start; }
.fc-single__titlecol { min-width: 0; }
.fc-single__head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.fc-single__title { font-size: 40px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.fc-single__meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; text-align: right; font-size: 14px; white-space: nowrap; }
.fc-single__sep { opacity: .45; font-weight: 400; }
.fc-single__rule { border: 0; border-top: 1px dashed rgba(28,29,26,.35); margin: 20px 0 0; }
.fc-single__desc { position: relative; font-size: 16px; line-height: 1.7; color: var(--color-ink); max-width: 800px; margin-top: 24px; }
.fc-single__desc-text p { margin: 0 0 16px; }
.fc-single__desc-text p:last-child { margin-bottom: 0; }
.fc-single__desc.is-clipped { cursor: pointer; }
.fc-single__desc.is-clipped .fc-single__desc-text { max-height: 148px; overflow: hidden; }
.fc-single__desc-more {
	display: none; border: 0; padding: 0; width: 100%;
	position: absolute; left: 0; right: 0; bottom: 0; height: 84px;
	background: linear-gradient(to bottom, rgba(251,246,244,0), var(--color-cream) 100%);
	cursor: pointer;
}
.fc-single__desc.is-clipped .fc-single__desc-more { display: block; }

.fc-single__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 40px; }
.fc-styles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
/* Split mode (sort = upright-first): left column upright, right column italic. */
.fc-styles-grid__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fc-styles-grid__item { font-size: 24px; font-weight: 600; line-height: 1.25; }

.fc-specimen-link { display: inline-flex; align-items: center; gap: 10px; color: var(--color-accent); opacity: 1; transition: opacity .15s ease; }
.fc-specimen-link:hover { text-decoration: none; opacity: .7; }
.fc-specimen-link img, .fc-specimen-link svg { width: 151px; height: auto; display: block; }

/* ---------- License panel ---------- */
.fc-license-panel {
	background: var(--color-accent-soft);
	border-radius: 12px;
	padding: 24px 22px;
	position: sticky;
	top: calc(var(--navbar-h) + 24px);
}
body.admin-bar .fc-license-panel {
	top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--navbar-h) + 24px);
}
.fc-license-panel__title { margin-bottom: 12px; text-align: center; }
.fc-license-panel__rule { border: 0; border-top: 1px dashed rgba(28,29,26,.35); margin: 0 0 8px; }
.fc-license-panel__list { display: flex; flex-direction: column; }

.fc-license-row {
	display: grid;
	grid-template-columns: 20px 26px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	margin: 0 -10px;
	border-radius: 8px;
	cursor: pointer;
	position: relative;
	transition: background .15s ease;
}
.fc-license-row input[type="checkbox"] { position: absolute; opacity: 0; }
.fc-license-row__check {
	width: 18px; height: 18px; border: 1.5px solid var(--color-ink); border-radius: 4px;
	display: flex; align-items: center; justify-content: center;
	transition: background .15s ease;
}
.fc-license-row__check .material-symbols-outlined {
	font-size: 14px; color: var(--color-cream); opacity: 0; transition: opacity .15s ease;
	font-variation-settings: 'wght' 500;
}
.fc-license-row input:checked + .fc-license-row__check { background: var(--color-accent); border-color: var(--color-accent); }
.fc-license-row input:checked + .fc-license-row__check .material-symbols-outlined { opacity: 1; }
.fc-license-row__icon {
	font-size: 24px; line-height: 1; color: var(--color-ink);
	font-variation-settings: 'wght' 400;
	display: inline-flex; align-items: center; justify-content: center;
	user-select: none;
}
.fc-license-row__name { font-size: 14px; }
.fc-license-row__price { font-size: 14px; color: var(--color-accent); font-weight: 500; }
.fc-license-row:hover { background: #F8F8FF; }
.fc-license-row:hover .fc-license-row__name { color: var(--color-accent); }

/* Hover details tooltip — same look as the license panel */
.fc-license-row__desc {
	position: absolute; right: 100%; top: 0; margin-right: 12px;
	width: 320px; background: var(--color-accent-soft); color: var(--color-ink);
	border-radius: 12px;
	padding: 24px 22px; font-size: 14px; line-height: 1.6;
	box-shadow: 0 8px 24px rgba(28,29,26,.08);
	z-index: 20; cursor: default;
}
.fc-license-row:hover .fc-license-row__desc { display: block !important; }
.fc-license-row__desc-title { display: block; text-align: center; }
.fc-license-row__desc-rule {
	display: block; border-top: 1px dashed rgba(28,29,26,.35);
	margin: 12px 0 16px;
}
.fc-license-row__desc-item {
	display: block; position: relative; padding-left: 18px; margin-bottom: 4px;
}
.fc-license-row__desc-item:last-child { margin-bottom: 0; }
.fc-license-row__desc-item::before {
	content: "•"; position: absolute; left: 2px; top: 0;
}

.fc-license-panel__total-label { text-align: center; margin: 18px 0 6px; color: var(--color-muted); }
.fc-license-panel__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.fc-license-panel__total { font-size: 20px; font-weight: 700; color: var(--color-accent-strong); }
.fc-license-panel__save { text-align: center; font-size: 13px; color: var(--color-accent); margin-top: 6px; }

.fc-qty {
	display: inline-flex; align-items: center; gap: 4px;
	background: var(--color-cream); border-radius: 10px; padding: 6px 10px;
}
.fc-qty__btn {
	width: 26px; height: 26px; border-radius: 50%; border: 0; background: none;
	cursor: pointer; font-size: 16px; line-height: 1; color: var(--color-ink);
	display: flex; align-items: center; justify-content: center;
}
.fc-qty__btn:hover { background: var(--color-accent-soft); color: var(--color-accent); }
.fc-qty__value { min-width: 24px; text-align: center; font-size: 14px; font-weight: 600; }

.fc-license-panel__actions { display: flex; gap: 10px; margin-top: 20px; }
.fc-license-panel__actions .fc-btn { flex: 1; padding: 12px 10px; font-size: 13px; border-radius: 10px; }
.fc-license-panel__actions .fc-btn:disabled { opacity: .6; cursor: wait; }
.fc-license-panel__notice {
	margin-top: 12px; border-radius: 10px; padding: 10px 14px;
	font-size: 13px; text-align: center;
}
.fc-license-panel__notice.is-success { background: var(--color-ink); color: var(--color-cream); }
.fc-license-panel__notice.is-error { background: #fdecec; color: #b3261e; }

/* ---------- Type tester ---------- */
.fc-type-testers { margin-top: 72px; display: flex; flex-direction: column; gap: 0; min-width: 0; }
/* Hide previews until the real font is ready — never show fallback text. */
.fc-type-testers.is-font-loading .fc-tester__preview { visibility: hidden; }
/* Character map renders an Inter fallback first; keep it hidden until the
   real font is fetched + parsed (JS removes the class; noscript reveals). */
.fc-charmap.is-font-loading { visibility: hidden; }
.fc-tester__head { display: grid; grid-template-columns: 35fr 65fr; align-items: center; gap: 16px; }
.fc-tester__name { font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-tester__controls { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.fc-tester__control { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; flex: 1 1 auto; min-width: 0; }
/* Thin-line slider with hollow circle handle (per PDF ref: —○—). */
.fc-tester__control input[type="range"] {
	flex: 1 1 auto; min-width: 48px; width: auto;
	-webkit-appearance: none; appearance: none;
	background: transparent; height: 20px; margin: 0; cursor: pointer;
}
.fc-tester__control input[type="range"]::-webkit-slider-runnable-track {
	height: 1px; background: var(--color-ink);
}
.fc-tester__control input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--color-cream); border: 1px solid var(--color-ink);
	margin-top: -8.5px; cursor: pointer;
}
.fc-tester__control input[type="range"]::-moz-range-track {
	height: 1px; background: var(--color-ink);
}
.fc-tester__control input[type="range"]::-moz-range-thumb {
	width: 15px; height: 15px; border-radius: 50%;
	background: var(--color-cream); border: 1px solid var(--color-ink);
	cursor: pointer;
}
.fc-tester__align { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.fc-tester__align-btn {
	background: none; border: 0; padding: 4px; cursor: pointer; opacity: .35;
	display: inline-flex; align-items: center; justify-content: center; color: var(--color-ink);
}
.fc-tester__align-btn .material-symbols-outlined { font-size: 20px; font-variation-settings: 'wght' 200; }
.fc-tester__align-btn:hover { opacity: .7; }
.fc-tester__align-btn.is-active { opacity: 1; }
.fc-tester__size-val, .fc-tester__spacing-val { font-size: 13px; color: var(--color-muted); min-width: 44px; }
.fc-tester__preview {
	font-size: 82px; line-height: 1.15; outline: none; margin-top: 12px;
	white-space: nowrap; overflow: hidden; overflow-wrap: break-word;
	padding: 8px .12em 8px 0;
}

/* ---------- Character map (own section inside left column, after testers) ---------- */
.fc-charmap { margin-top: 72px; border-top: 1px dashed rgba(28,29,26,.35); padding-top: 48px; min-width: 0; }
.fc-charmap:empty { display: none; }
.character-viewer__monitor__style { gap: 8px; }
/* Plain-text look, same as the detail spans below it — native dropdown kept. */
.fc-charmap-style {
	appearance: none; -webkit-appearance: none;
	border: 0; border-radius: 0; background: transparent;
	padding: 0; margin: 0;
	font: inherit; color: inherit; line-height: inherit;
	cursor: pointer; flex: 1 1 auto; min-width: 0; max-width: 100%;
	text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
}
.fc-charmap-style::-ms-expand { display: none; }
/* No focus ring by owner request: the select never draws an outline,
   and the wrapper doesn't either. */
.fc-charmap-style:focus,
.fc-charmap-style:focus-visible,
.character-viewer__monitor__style:has(> .fc-charmap-style:focus-visible) {
	outline: none;
}
.character-viewer__monitor__style-arrow {
	flex: 0 0 auto; width: 0; height: 0; pointer-events: none;
	border-left: 4px solid transparent; border-right: 4px solid transparent;
	border-top: 5px solid currentColor; opacity: .55;
}
.character-viewer__monitor__style:hover .character-viewer__monitor__style-arrow { opacity: 1; }

/* ---------- Related (inside left column, above license sticky bottom) ---------- */
.fc-related { margin-top: 72px; min-width: 0; }
.fc-related__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 39px; }

/* ---------- Fonts archive page ---------- */
.fc-page-title {
	font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em;
	margin: 48px 0 53px;
}

/* ---------- Blog ---------- */
.fc-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px 35px; row-gap: 64px; }
.fc-post { max-width: 800px; margin: 24px auto 0; }
.fc-post__thumb { margin: 24px 0; border-radius: var(--fontsco-image-rounding-md, 0); overflow: hidden; }
.fc-post__content { font-size: 16px; line-height: 1.7; }

/* ---------- WooCommerce cart / checkout / account ---------- */
.woocommerce-cart .container,
.woocommerce-checkout .container,
.woocommerce-account .container { margin-top: 40px; }
.woocommerce table.shop_table {
	border: 1px solid rgba(28,29,26,.12); border-radius: 8px; border-collapse: separate; border-spacing: 0;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 14px 16px; }
.woocommerce table.shop_table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button {
	background: var(--color-accent-strong); color: var(--color-cream); border-radius: 999px;
	padding: 12px 28px; font-weight: 500; border: 0;
}
.woocommerce .button:hover, .woocommerce button.button:hover, .woocommerce a.button:hover { background: var(--color-ink); color: var(--color-cream); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea,
.woocommerce .select2-container .select2-selection--single {
	border: 1px solid rgba(28,29,26,.2); border-radius: 8px; padding: 12px 14px; background: transparent;
}
.woocommerce-checkout #payment { background: var(--color-accent-soft); border-radius: 12px; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error {
	border-top-color: var(--color-accent); background: var(--color-accent-soft); border-radius: 8px; color: var(--color-ink);
}
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 10px 0; font-weight: 500; }
.woocommerce-MyAccount-navigation li.is-active a { color: var(--color-accent); }

/* ---------- Empty cart: use homepage card grid instead of Woo default ---------- */
/* Keep "Your cart is currently empty!" + dots, hide "New in store" + product-new. */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block > h2.wp-block-heading:not(.with-empty-cart-icon),
.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid.wp-block-product-new {
	display: none;
}
.fc-cart-recs { margin-top: 64px; }
.fc-cart-recs[hidden] { display: none; }

/* ---------- Cart line-item image: true ratio, no square crop ---------- */
/* Beat Woo cart.css `table.wc-block-cart-items ... .wc-block-cart-item__image img` (width:100%). */
.woocommerce-cart table.wc-block-cart-items tbody .wc-block-cart-item__image img {
	width: 120px;
	height: auto;
	aspect-ratio: auto;
	object-fit: contain;
	display: block;
	border-radius: 8px;
}

/* ---------- Cart bulk select (checkbox left of image) ---------- */
.fc-cart-bulkbar { margin-bottom: 16px; }
.fc-cart-bulk-remove {
	background: var(--color-ink); color: var(--color-cream);
	border: 0; border-radius: 10px; padding: 10px 24px;
	font-weight: 500; cursor: pointer;
}
.fc-cart-bulk-remove:disabled { opacity: .35; cursor: default; }
.fc-cart-select-head { width: 32px; }
.fc-cart-select-cell { vertical-align: middle; }
.fc-cart-select, .fc-cart-select-all {
	width: 18px; height: 18px; accent-color: var(--color-accent-strong); cursor: pointer;
}

/* ---------- Cart Proceed to Checkout: blue + 15px radius ---------- */
.woocommerce-cart .wp-block-woocommerce-proceed-to-checkout-block .wc-block-cart__submit-button {
	background: #2036fd; border-radius: 10px;
}
.woocommerce-cart .wp-block-woocommerce-proceed-to-checkout-block .wc-block-cart__submit-button:hover { background: var(--color-ink); }

/* ---------- Cart 5-column layout: check | image | details | qty | total ---------- */
.woocommerce-cart .wp-block-woocommerce-cart-items-block table { width: 100%; }
.woocommerce-cart thead tr.wc-block-cart-items__header,
.woocommerce-cart tbody tr.wc-block-cart-items__row {
	display: grid;
	grid-template-columns: 28px 128px minmax(0, 1fr) auto 112px;
	column-gap: 12px;
	align-items: center;
}
/* Give the items column room so "Name - License" fits on one line. */
.woocommerce-cart .wc-block-components-sidebar-layout { column-gap: 32px; }
.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-cart__sidebar { flex-basis: 252px; }
/* Header: SOLID dividers above + below, labels uppercase + letterspaced. */
.woocommerce-cart thead tr.wc-block-cart-items__header {
	padding: 12px 0;
	border-top: 1px solid rgba(28,29,26,.25);
	border-bottom: 1px solid rgba(28,29,26,.25);
}
.woocommerce-cart thead tr.wc-block-cart-items__header > th { padding: 0; margin: 0; border: 0; }
.woocommerce-cart thead tr.wc-block-cart-items__header > th::before,
.woocommerce-cart thead tr.wc-block-cart-items__header > th::after { content: none; }
.woocommerce-cart .fc-cart-select-head { grid-column: 1; grid-row: 1; align-self: center; }
.woocommerce-cart thead th.wc-block-cart-items__header-image { grid-column: 2; grid-row: 1; }
.woocommerce-cart thead th.wc-block-cart-items__header-product { grid-column: 3; grid-row: 1; text-align: left; }
.woocommerce-cart thead th.fc-cart-qty-head { grid-column: 4; grid-row: 1; }
.woocommerce-cart thead th.wc-block-cart-items__header-total { grid-column: 5; grid-row: 1; text-align: right; }
.woocommerce-cart .fc-cart-head-label { text-transform: uppercase; letter-spacing: .15em; }
/* Per-product dashed divider; products stack vertically with space between. */
/* Last row: no dashed (only the table's own solid bottom border shows). */
.woocommerce-cart tbody tr.wc-block-cart-items__row {
	padding: 20px 0;
	border-bottom: 1px dashed rgba(28,29,26,.25);
}
.woocommerce-cart tbody tr.wc-block-cart-items__row:last-child { border-bottom: 0; }
/* Column placement: ONE grid row per product (details/qty/total side by side). */
/* The original product cell stays in place but hidden (React-safe); custom
   cells built by JS take its place in the grid. */
.woocommerce-cart table.wc-block-cart-items td.fc-cart-select-cell { grid-column: 1; grid-row: 1; align-self: center; padding: 0; border: 0; }
.woocommerce-cart .fc-cart-select-cell .fc-cart-select { display: block; }
.woocommerce-cart table.wc-block-cart-items tbody td.wc-block-cart-item__image { grid-column: 2; grid-row: 1; padding: 0; border: 0; }
.woocommerce-cart table.wc-block-cart-items td.wc-block-cart-item__product { display: none; }
.woocommerce-cart tbody td.wc-block-cart-item__total {
	grid-column: 5; grid-row: 1; align-self: center; text-align: right; padding: 0; border: 0;
	display: flex; flex-direction: column; align-items: flex-end;
}
/* Details column: single stacked cell (name + prices + pill). */
.woocommerce-cart .fc-cart-details {
	grid-column: 3; grid-row: 1; align-self: center; min-width: 0;
	display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.woocommerce-cart .fc-cart-license-name {
	display: inline-flex; align-items: center; gap: 6px; min-width: 0;
	font-size: 15px; font-weight: 600; color: var(--color-ink);
}
.woocommerce-cart .fc-cart-license-name a { color: inherit; text-decoration: none; }
.woocommerce-cart .fc-cart-license-info { position: relative; display: inline-flex; }
.woocommerce-cart .fc-cart-license-info-icon {
	font-size: 16px; line-height: 1; color: var(--color-accent); cursor: help;
	font-variation-settings: 'wght' 400;
}
/* Info tooltip: same card as the single-product license hover, opens right of the icon. */
.woocommerce-cart .fc-cart-license-info .fc-license-row__desc {
	left: calc(100% + 10px); right: auto; top: 50%; transform: translateY(-50%);
	margin: 0; width: 300px; z-index: 60;
	display: none; text-align: left; font-weight: 400;
}
.woocommerce-cart .fc-cart-license-info:hover .fc-license-row__desc { display: block; }
/* Custom quantity cell (drives the hidden original). */
.woocommerce-cart .fc-cart-qty { grid-column: 4; grid-row: 1; align-self: center; border: 1px solid rgba(28,29,26,.25); }
.woocommerce-cart .fc-cart-qty__btn:disabled { opacity: .35; cursor: default; }
/* Custom remove icon: right side, under the "Save" pill (drives the hidden original). */
.woocommerce-cart .fc-cart-remove {
	display: inline-flex; align-items: center; justify-content: center;
	background: none; border: 0; padding: 4px; margin: 0; cursor: pointer;
	color: rgba(28,29,26,.55);
}
.woocommerce-cart .fc-cart-remove:hover { color: #b3261e; }
.woocommerce-cart .fc-cart-remove .material-symbols-outlined {
	font-size: 20px; line-height: 1; font-variation-settings: 'wght' 400;
}
/* Pills: bundle discount (under unit price) + save badge (under total). */
.woocommerce-cart .fc-cart-pill {
	display: inline-block;
	background: var(--color-accent-soft); color: var(--color-accent);
	border: 0; border-radius: 6px; box-shadow: none;
	padding: 4px 10px; font-size: 12px; font-weight: 500; line-height: 1.5;
	text-transform: none; letter-spacing: 0; white-space: nowrap;
}
.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
	display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
/* Small screens: compact stacked grid. */
@media (max-width: 640px) {
	.woocommerce-cart thead tr.wc-block-cart-items__header { display: none; }
	.woocommerce-cart tbody tr.wc-block-cart-items__row { grid-template-columns: 24px 72px minmax(0, 1fr); }
	.woocommerce-cart table.wc-block-cart-items td.fc-cart-select-cell { grid-column: 1; grid-row: 1; }
	.woocommerce-cart tbody td.wc-block-cart-item__image { grid-column: 2; grid-row: 1 / span 2; }
	.woocommerce-cart .fc-cart-details { grid-column: 3; grid-row: 1; }
	.woocommerce-cart .fc-cart-qty { grid-column: 3; grid-row: 2; justify-self: start; }
	.woocommerce-cart tbody td.wc-block-cart-item__total {
		grid-column: 3; grid-row: 3; align-self: start;
		flex-direction: row; align-items: center; justify-content: flex-start;
	}
	.woocommerce-cart .wc-block-components-sidebar-layout { display: block; }
	.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-cart__sidebar { flex-basis: auto; }
}

/* ---------- Pagination ---------- */
.woocommerce nav.woocommerce-pagination ul { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span {
	border-radius: 6px; padding: 8px 14px;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--color-ink); color: var(--color-cream); }

/* ---------- Navbar expanding search (Opsi A: overlay, ikon cart/account tetap) ---------- */
.fc-navbar-search-wrap { position: relative; display: inline-flex; align-items: center; }
.fc-navbar-search {
	position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
	width: 0; opacity: 0; overflow: hidden;
	display: flex; justify-content: flex-end;
	pointer-events: none;
	transition: width .35s ease, opacity .25s ease;
}
.fc-navbar-search.is-open { width: min(280px, 45vw); opacity: 1; pointer-events: auto; }
.fc-navbar-search input {
	width: min(280px, 45vw); max-width: 45vw; box-sizing: border-box; flex: 0 0 auto;
	border: 1px solid rgba(28,29,26,.2); border-radius: 999px; padding: 10px 18px;
	font-family: var(--font-ui); font-size: 14px; color: var(--color-ink);
	background: #fff; outline: none;
}
.fc-navbar-search input:focus { border-color: var(--color-accent); }
.fc-navbar-search input::-webkit-search-cancel-button { display: none; }

/* ---------- Licenses page (craftsupply-style accordion, no Elementor) ---------- */
.fc-licenses { padding: 48px 0 80px; }
.fc-licenses__title { font-size: 40px; font-weight: 600; text-align: center; margin: 0 0 24px; letter-spacing: -0.01em; }
.fc-licenses__intro { font-size: 18px; line-height: 1.7; text-align: center; margin: 0 0 40px; }
.fc-licenses__custom { font-size: 16px; line-height: 1.7; margin-bottom: 40px; }
.fc-licenses__item { border-bottom: 1px solid rgba(28,29,26,.85); }
.fc-licenses__item:first-of-type { border-top: 0; }
.fc-licenses__head { margin: 0; }
.fc-licenses__toggle {
	display: flex; align-items: center; gap: 14px; width: 100%;
	background: none; border: 0; padding: 22px 4px; cursor: pointer;
	font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--color-ink);
	text-align: left; letter-spacing: 0.01em;
}
.fc-licenses__toggle:hover { color: var(--color-accent-strong); }
.fc-licenses__sign { position: relative; flex: 0 0 auto; width: 18px; height: 18px; }
.fc-licenses__sign::before, .fc-licenses__sign::after {
	content: ""; position: absolute; background: currentColor; border-radius: 1px;
}
.fc-licenses__sign::before { left: 0; right: 0; top: 8px; height: 2px; }
.fc-licenses__sign::after { top: 0; bottom: 0; left: 8px; width: 2px; }
.fc-licenses__toggle.is-open .fc-licenses__sign::after { display: none; }
.fc-licenses__body { padding: 0 4px 8px 36px; }
.fc-licenses__body ul { list-style: disc; margin: 0; padding: 0 0 0 20px; }
.fc-licenses__body li { font-size: 16px; line-height: 2; margin-bottom: 6px; }

/* ---------- FAQ page (craftsupply-style accordion, no Elementor) ---------- */
.fc-faq { padding: 48px 0 80px; }
.fc-faq__title { font-size: 40px; font-weight: 600; text-align: center; margin: 0 0 40px; letter-spacing: -0.01em; }
.fc-faq__custom { font-size: 16px; line-height: 1.7; margin-bottom: 40px; }
.fc-faq__item { border-bottom: 1px solid rgba(28,29,26,.85); }
.fc-faq__item:first-of-type { border-top: 0; }
.fc-faq__head { margin: 0; }
.fc-faq__toggle {
	display: flex; align-items: center; gap: 14px; width: 100%;
	background: none; border: 0; padding: 22px 4px; cursor: pointer;
	font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--color-ink);
	text-align: left; letter-spacing: 0.01em;
}
.fc-faq__toggle:hover { color: var(--color-accent-strong); }
.fc-faq__sign { position: relative; flex: 0 0 auto; width: 18px; height: 18px; }
.fc-faq__sign::before, .fc-faq__sign::after {
	content: ""; position: absolute; background: currentColor; border-radius: 1px;
}
.fc-faq__sign::before { left: 0; right: 0; top: 8px; height: 2px; }
.fc-faq__sign::after { top: 0; bottom: 0; left: 8px; width: 2px; }
.fc-faq__toggle.is-open .fc-faq__sign::after { display: none; }
.fc-faq__body { padding: 0 4px 8px 36px; }
.fc-faq__answer { font-size: 16px; line-height: 2; }
.fc-faq__answer p { margin: 0 0 6px; }
.fc-faq__answer ul { list-style: disc; margin: 0; padding: 0 0 0 20px; }
.fc-faq__answer li { margin-bottom: 6px; }

/* ---------- Support page (Pangram-style contact, Fontsco visual) ---------- */
.fc-support { padding: 48px 0 80px; }
.fc-support__title { font-size: 40px; font-weight: 600; text-align: center; margin: 0 0 24px; letter-spacing: -0.01em; }
.fc-support__intro { font-size: 18px; line-height: 1.7; text-align: center; margin: 0 0 40px; }
.fc-support__custom { font-size: 16px; line-height: 1.7; margin-bottom: 40px; }
.fc-support__faqbox {
	background: var(--color-accent-soft); border-radius: 12px;
	padding: 24px 22px; margin: 0 0 48px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
}
.fc-support__faqbox-text { font-size: 16px; font-weight: 600; margin: 0; flex: 1 1 auto; }
.fc-support__faqbox-btn { flex: 0 0 auto; }
.fc-support__form { margin: 0 0 48px; }
.fc-support__field { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.fc-support__label {
	display: block; font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 10px;
}
.fc-support__pills { display: flex; flex-wrap: wrap; gap: 10px; }
.fc-support__pill { position: relative; }
.fc-support__pill input { position: absolute; opacity: 0; }
.fc-support__pill span {
	display: inline-block; border: 1px solid var(--color-ink); border-radius: 999px;
	padding: 10px 18px; font-size: 14px; font-weight: 500; cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.fc-support__pill span:hover { background: var(--color-accent-soft); }
.fc-support__pill input:checked + span { background: var(--color-ink); color: var(--color-cream); }
.fc-support__pill input:focus-visible + span { outline: 2px solid var(--color-accent-strong); outline-offset: 2px; }
.fc-support__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fc-support__input {
	width: 100%; box-sizing: border-box; border: 1px solid rgba(28,29,26,.2); border-radius: 8px;
	padding: 12px 14px; font-size: 16px; font-family: var(--font-ui);
	background: transparent; color: var(--color-ink);
}
.fc-support__input:focus { border-color: var(--color-accent); outline: none; }
textarea.fc-support__input { resize: vertical; min-height: 140px; }
.fc-support__notice { border-radius: 10px; padding: 10px 14px; font-size: 13px; text-align: center; }
.fc-support__notice[hidden] { display: none; }
.fc-support__notice.is-success { background: var(--color-ink); color: var(--color-cream); }
.fc-support__notice.is-error { background: #fdecec; color: #b3261e; }
.fc-support__send { width: 100%; border-radius: 10px; }
.fc-support__alt {
	background: var(--color-accent-soft); border-radius: 12px;
	padding: 24px 22px; text-align: center;
}
.fc-support__alt-title { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.fc-support__alt-text { font-size: 16px; line-height: 1.7; margin: 0 0 16px; }
.fc-support__noscript { font-size: 14px; margin-top: 24px; text-align: center; }

/* ---------- About page (foundry statement) ---------- */
.fc-about { padding: 48px 0 80px; }
.fc-about__title { font-size: 40px; font-weight: 600; text-align: center; margin: 0 0 40px; letter-spacing: -0.01em; }
.fc-about__custom { font-size: 16px; line-height: 1.7; margin-bottom: 40px; }
.fc-about__inner { margin: 0 auto; }
.fc-about__lead { font-size: 14px; font-weight: 400; line-height: 1.85; margin: 0 0 20px; }
.fc-about__text { font-size: 14px; line-height: 1.85; margin: 0 0 20px; }

/* ---------- Homepage v2 (/v2/) font list ---------- */
/* Text-only cards in a 2-column grid, thin outline.
   Head row: Inter 18px — name (left) | styles (center) | "from $price" (right).
   Specimen: font name in its own font (weight/size via metabox/values inline);
   hover animates wght — see font-list-v2.js. */
.fc-v2-wrap { margin-top: 54px; }
.fc-v2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	column-gap: 24px;
	row-gap: 24px;
}
.fc-v2-card {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(28, 29, 26, .18);
	border-radius: var(--fontsco-image-rounding-md, 12px);
	background: transparent;
	padding: 16px 20px 12px;
	transition: background-color .2s ease, border-color .2s ease;
}
.fc-v2-card:hover {
	background: #fff;
	border-color: rgba(28, 29, 26, .3);
}
.fc-v2-card__head {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: baseline;
	gap: 12px;
	font-size: 14px;
	line-height: 1.4;
}
/* Center column must sit at the true middle even when the side columns differ
   in width: the grids on both sides are 1fr, so auto stays centered. */
.fc-v2-card__name {
	text-align: left;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.fc-v2-card__styles {
	text-align: center;
	font-weight: 400;
	color: var(--color-ink);
}
.fc-v2-card__price {
	text-align: right;
	font-weight: 400;
	color: var(--color-muted);
}
.fc-v2-card__specimen {
	padding: 28px 0 8px;
	overflow: hidden;
	text-align: center;
}
.fc-v2-card__fontname {
	display: inline-block;
	max-width: 100%;
	font-size: 64px;
	font-weight: 400;
	line-height: 1.08;
	white-space: nowrap;
	box-sizing: border-box;
	overflow: hidden;
	text-overflow: ellipsis;
	/* Breathing room: italic overhang (right) and heavy-weight descender swell
	   (bottom) paint past the line box. The span's own clip edge is its padding
	   box, so ink stays fully visible inside this padding; ellipsis still ends
	   long names neatly. Nett visual paddings to the glyph are unchanged. */
	padding: 12px 20px 18px;
	/* No transition: the wght animation is driven by rAF (linear), never CSS-eased. */
}

@media (max-width: 760px) {
	.fc-v2 { grid-template-columns: 1fr; }
}
/* ── Character Viewer — exact reference implementation ──────────────────────── */
.collection__character-set {
	position: relative;
	border-top-color: transparent;
	padding-top: 60px;
	padding-left: var(--site-side-padding, 25px);
	padding-right: var(--site-side-padding, 25px);
	max-width: calc(
		var(--site-max-width, 1600px) + 2 *
			var(--site-side-padding, 25px)
	);
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.collection__character-set::before {
	content: "";
	position: absolute;
	top: 0;
	right: var(--site-side-padding, 25px);
	left: var(--site-side-padding, 25px);
	border-top: 1px solid #000000;
}

.character-viewer {
	--size: calc(var(--monitor-width) * 1 / 2);
	--half-gap: calc(var(--line-gap) / 2);
	--scale: calc(var(--size) / var(--units-per-em));
	font-size: 1rem;
	line-height: normal;
	font-family: var(--wp--preset--font-family--roboto-mono, 'Roboto Mono', monospace);
}
.character-viewer__character-map {
	margin-bottom: 30px;
	grid-gap: 30px;
	grid-template-columns: minmax(0, min(40%, 500px)) auto;
	display: grid;
	position: relative;
}
@media screen and (min-width: 600px) {
	.character-viewer__character-map {
		margin-bottom: 120px;
	}
}
@media screen and (max-width: 599px) {
	.character-viewer__character-map {
		grid-template-columns: auto;
	}
	.character-viewer__monitor {
		display: none;
	}
}
.character-viewer__monitor__container {
	top: calc(var(--navbar-h, 75px) + var(--domi-space-4, 1.5rem));
	position: sticky;
}
body.admin-bar .character-viewer__monitor__container {
	top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--navbar-h, 75px) + var(--domi-space-4, 1.5rem));
}
.character-viewer__monitor__character-container {
	/* Breathing room inside the lavender box: lines + glyph are
	   absolutely positioned (they ignore padding), so the offsets below
	   shift them together and the height grows to match. */
	--cv-line-pad-top: 28px;
	--cv-line-pad-x: 20px;
	height: calc(
		1px *
			(var(--ascender) - var(--descender) + var(--line-gap)) *
			var(--scale) + var(--cv-line-pad-top)
	);
	margin-bottom: 32px;
	position: relative;
	background: #E5E7FB;
	border-radius: 12px;
	padding: 0 0 24px;
}
.character-viewer__monitor__character {
	font-size: calc(1px * var(--size));
	text-align: center;
	white-space: pre;
	z-index: 1;
	line-height: 1;
	position: absolute;
	/* Initial approximation only — character-viewer.js re-calibrates `top`
	   at runtime (probe measures the rendered font's real baseline and
	   shifts the glyph so it meets the baseline metric line). */
	top: calc(
		1px *
			(
				var(--ascender) + var(--half-gap) - var(--units-per-em) / 2 -
				(var(--glyph-ascent, var(--ascender)) + var(--glyph-descent, var(--descender))) /
					2
			) *
			var(--scale) + var(--cv-line-pad-top)
	);
	left: 0;
	width: 100%;
}
.character-viewer__monitor__line {
	border-top: 1px dashed currentcolor;
	justify-content: space-between;
	width: auto;
	height: 0;
	font-size: 9px;
	display: flex;
	position: absolute;
	top: 0;
	left: var(--cv-line-pad-x);
	right: var(--cv-line-pad-x);
	opacity: 0.4;
}
.character-viewer__monitor__line[data-name="baseline"] {
	top: calc(
		1px * (var(--ascender) + var(--half-gap)) * var(--scale) -
			0.5px + var(--cv-line-pad-top)
	);
	opacity: 0.8;
}
.character-viewer__monitor__line[data-name="ascender"] {
	top: calc(1px * var(--half-gap) * var(--scale) + var(--cv-line-pad-top));
}
.character-viewer__monitor__line[data-name="cap-height"] {
	top: calc(
		1px *
			(
				var(--ascender) + var(--half-gap) -
					var(--cap-height)
			) *
			var(--scale) + var(--cv-line-pad-top)
	);
}
.character-viewer__monitor__line[data-name="x-height"] {
	top: calc(
		1px *
			(var(--ascender) - var(--x-height) + var(--half-gap)) *
			var(--scale) + var(--cv-line-pad-top)
	);
}
.character-viewer__monitor__line[data-name="descender"] {
	top: calc(
		1px *
			(var(--ascender) - var(--descender) + var(--half-gap)) *
			var(--scale) + var(--cv-line-pad-top)
	);
}
.character-viewer__monitor__line__label {
	white-space: nowrap;
	opacity: 0.6;
	padding-right: 4px;
}
.character-viewer__monitor__line__value {
	white-space: nowrap;
	opacity: 0.6;
	padding-left: 4px;
}
.character-viewer__monitor__details {
	grid-column-gap: 20px;
	--checkbox-size: 20px;
	--checkbox-margin: 10px;
	grid-template-columns: max-content auto;
	line-height: 1.6;
	display: grid;
}
.character-viewer__monitor__details > span {
	white-space: nowrap;
	text-overflow: ellipsis;
	align-items: center;
	display: flex;
	overflow: hidden;
}
.character-viewer__monitor__details > span > label {
	align-items: center;
	display: flex;
}
@media screen and (max-width: 1000px) {
	.character-viewer__monitor__details {
		grid-template-columns: auto;
	}
	.character-viewer__monitor__details > :nth-child(2n) {
		margin-bottom: 16px;
	}
}
.character-viewer__monitor__details .select {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-bottom: 0;
}
.character-viewer__monitor__details .select__select {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
}
#cv-style-select {
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}
.character-viewer__monitor__details .select__text {
	display: flex;
	align-items: center;
	gap: 4px;
	box-sizing: border-box;
}
.character-viewer__monitor__details .icon svg {
	width: 8px;
	height: 8px;
}
/* blocks */
.character-viewer__block {
	clear: both;
}
.character-viewer__block:not(:first-child) {
	padding-top: 20px;
}
.character-viewer__block__name {
	height: 30px;
	display: flex;
	align-items: center;
	font-size: 11px;
	opacity: 0.5;
}
.character-viewer__block__characters {
	font-size: 30px;
}
.character-viewer__block__character-list {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 2px;
	background: transparent;
	border-radius: 12px;
	overflow: hidden;
	padding: 6px;
}
.character-viewer__block__character-list > div {
	--size: 1;
	text-align: center;
	cursor: pointer;
	white-space: pre;
	width: auto;
	height: auto;
	aspect-ratio: 1 / 1;
	/* Grid items default to min-*:auto (= content minimum), so a font
	   with tall line-box metrics stretches glyph cells taller than the
	   ratio box — while the space cell (whitespace-only content) stays
	   square. Reset both so every cell is exactly one square track. */
	min-width: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 8px;
	/* Solid cards read against the page; full-ink text so #1c1d1a shows. */
	background: #fff;
	color: #1c1d1a;
	justify-content: center;
	align-items: center;
	display: flex;
	position: relative;
	opacity: 1;
}
.character-viewer__block__character-list > div[data-size="2"] {
	grid-column: span 2;
	aspect-ratio: 2 / 1;
}
.character-viewer__block__character-list > div[data-size="3"] {
	grid-column: span 3;
	aspect-ratio: 3 / 1;
}
.character-viewer__block__character-list > div[data-size="4"] {
	grid-column: span 4;
	aspect-ratio: 4 / 1;
}
.character-viewer__block__character-list > div[data-size="5"] {
	grid-column: span 5;
	aspect-ratio: 5 / 1;
}
.character-viewer__block__character-list > div:hover,
.character-viewer__block__character-list > div[data-selected="true"] {
	opacity: 1;
	background: #E5E7FB;
}

.character-viewer__block__character-list > div:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: -2px;
}

/* Type Tester toolbar & slider styles */
.type-tester {
	border-top: 1px solid #000;
	padding-top: 20px;
	padding-bottom: 0;
	margin-bottom: 0;
}
.type-tester__toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	font-family: var(--domi-font-body, var(--wp--preset--font-family--inter, Inter, sans-serif));
	font-size: 12px;
}
.type-tester__toolbar__tools {
	display: flex;
	align-items: center;
	gap: 20px;
}
.type-tester__slider {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 200px;
}
.type-tester__slider__track {
	flex: 1;
	height: 2px;
	background: #ccc;
	position: relative;
	cursor: pointer;
}
.type-tester__slider__handle {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #000;
	border: none;
	cursor: grab;
}
.type-tester__align {
	display: flex;
	gap: 2px;
}
.type-tester__align__btn {
	background: none;
	border: none;
	cursor: pointer;
	opacity: 0.4;
	padding: 4px;
}
.type-tester__align__btn[data-active="true"] {
	opacity: 1;
}
.type-tester__edit-all {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 6px;
}
