/* ==========================================================================
   The Ledger — registry index and provenance pages.
   Inherits every token from the theme; only the record-specific furniture
   lives here.
   ========================================================================== */

.tf-ledger { padding-block: clamp(8rem, 16vh, 11rem) 0; }

/* --------------------------------------------------------------------------
   Provenance page head
   -------------------------------------------------------------------------- */

.tf-rec {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
}

@media (max-width: 960px) { .tf-rec { grid-template-columns: 1fr; } }

.tf-rec__plate {
	position: relative;
	border: 1px solid var(--tf-hair);
	border-radius: var(--tf-drawn);
	overflow: hidden;
	background: var(--tf-pitch);
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
}

.tf-rec__plate img { width: 100%; display: block; }

/* The struck number, sitting on the artwork like the plate on the piece. */
.tf-rec__no {
	position: absolute;
	top: 1rem;
	left: 1rem;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.625rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--tf-oxide-lt);
	background: rgba(5, 5, 5, 0.72);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--tf-hair);
	border-radius: 999px;
	padding: 0.5rem 0.95rem;
}

.tf-rec__status {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--tf-steel);
	border: 1px solid var(--tf-hair);
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
	margin-bottom: 1.5rem;
}

.tf-rec__status::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--tf-oxide-lt);
}

.tf-rec__status[data-status="sold"]::before,
.tf-rec__status[data-status="installed"]::before { background: var(--tf-patina); }

.tf-rec__status[data-status="available"]::before { background: var(--tf-steel-lt); }

.tf-rec h1 {
	font-family: 'Playfair Display', Georgia, serif;
	font-weight: 400;
	font-size: clamp(2.4rem, 4vw + 1rem, 4rem);
	line-height: 1.02;
	margin: 0 0 1.25rem;
	text-shadow: var(--tf-lift);
}

.tf-rec__lede {
	color: rgba(242, 237, 228, 0.86);
	font-size: 1.0625rem;
	line-height: 1.75;
	text-shadow: var(--tf-lift);
}

/* --------------------------------------------------------------------------
   Certificate — the brass plate, rendered
   -------------------------------------------------------------------------- */

.tf-cert {
	position: relative;
	border: 1px solid var(--tf-oxide);
	border-radius: 30px 4px 30px 4px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	margin: 2.5rem 0;
	background:
		linear-gradient(155deg, rgba(169, 104, 63, 0.16), rgba(5, 5, 5, 0.55) 62%);
	overflow: hidden;
}

.tf-cert::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: var(--tf-planish);
	background-size: 124px 98px;
	opacity: 0.8;
}

.tf-cert > * { position: relative; }

.tf-cert__k {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--tf-oxide-lt);
	margin: 0 0 1rem;
}

.tf-cert__line {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.75rem;
	line-height: 2.1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(242, 237, 228, 0.9);
	margin: 0 0 1.5rem;
}

.tf-cert__ref {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(169, 104, 63, 0.35);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.625rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tf-steel);
}

.tf-cert__ref strong { color: var(--tf-oxide-lt); font-weight: 400; }

/* --------------------------------------------------------------------------
   Inhabitant — the figure living in the piece
   -------------------------------------------------------------------------- */

.tf-inhab {
	border-left: 1px solid var(--tf-hair);
	padding: 0.25rem 0 0.25rem 1.5rem;
	margin: 2.5rem 0;
}

.tf-inhab__k {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--tf-steel);
	margin: 0 0 0.6rem;
}

.tf-inhab__name {
	font-family: 'Playfair Display', Georgia, serif;
	font-style: italic;
	font-size: 1.5rem;
	color: var(--tf-oxide-lt);
	margin: 0 0 0.5rem;
}

.tf-inhab p {
	color: rgba(242, 237, 228, 0.72);
	font-size: 0.9375rem;
	line-height: 1.75;
	margin: 0;
}

/* --------------------------------------------------------------------------
   Provenance timeline — hung on a length of twisted stock
   -------------------------------------------------------------------------- */

.tf-prov {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0 0 0 2.25rem;
}

.tf-prov::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 0.4rem;
	bottom: 0.4rem;
	width: 7px;
	border-radius: 4px;
	background: var(--tf-twist);
	opacity: 0.75;
}

.tf-prov li {
	position: relative;
	padding-block: 0.85rem;
	border-bottom: 1px solid var(--tf-hair-soft);
}

.tf-prov li:last-child { border-bottom: 0; }

.tf-prov li::before {
	content: "";
	position: absolute;
	left: -2rem;
	top: 1.35rem;
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: var(--tf-void);
	border: 1px solid var(--tf-oxide);
}

.tf-prov__date {
	display: block;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--tf-oxide-lt);
	margin-bottom: 0.3rem;
}

.tf-prov__event {
	color: rgba(242, 237, 228, 0.84);
	font-size: 0.9375rem;
	line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Registry index
   -------------------------------------------------------------------------- */

.tf-reg {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: clamp(0.9rem, 1.6vw, 1.6rem);
}

.tf-reg__card {
	position: relative;
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--tf-hair-soft);
	border-radius: var(--tf-drawn);
	overflow: hidden;
	background: var(--tf-pitch);
	transition: border-color 0.4s var(--tf-ease), transform 0.4s var(--tf-ease);
}

.tf-reg__card:nth-child(even) { border-radius: var(--tf-drawn-alt); }

.tf-reg__card:hover,
.tf-reg__card:focus-visible {
	border-color: var(--tf-oxide);
	transform: translateY(-3px);
}

.tf-reg__shot {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--tf-void);
}

.tf-reg__shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.9);
	transition: transform 1s var(--tf-ease), filter 0.5s var(--tf-ease);
}

.tf-reg__card:hover .tf-reg__shot img { transform: scale(1.05); filter: brightness(1.04); }

.tf-reg__body { padding: 1.15rem 1.25rem 1.35rem; }

.tf-reg__no {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.26em;
	color: var(--tf-oxide-lt);
	display: block;
	margin-bottom: 0.45rem;
}

.tf-reg__name {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.25rem;
	margin: 0 0 0.4rem;
}

.tf-reg__meta {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(242, 237, 228, 0.45);
	margin: 0;
}

/* --------------------------------------------------------------------------
   Print — a collector should be able to print the certificate
   -------------------------------------------------------------------------- */

@media print {
	.tf-room, .tf-head, .tf-foot, .tf-rec__plate, .tf-prov::before { display: none !important; }
	body { background: #fff !important; color: #111 !important; }
	.tf-ledger { padding-top: 0; }
	.tf-cert { border-color: #8a5a33; background: none; }
	.tf-cert__line, .tf-rec h1, .tf-prov__event { color: #111 !important; text-shadow: none !important; }
	.tf-specs .k, .tf-cert__ref { color: #555 !important; }
	.tf-specs .v, .tf-cert__ref strong, .tf-prov__date { color: #8a5a33 !important; }
}


/* --------------------------------------------------------------------------
   Trade programme
   -------------------------------------------------------------------------- */

.tf-trade {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: start;
	margin-top: clamp(2rem, 4vw, 3.5rem);
}

@media (max-width: 960px) { .tf-trade { grid-template-columns: 1fr; } }

.tf-trade__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--tf-hair-soft);
}

.tf-trade__list li {
	padding-block: 1.1rem;
	border-bottom: 1px solid var(--tf-hair-soft);
	color: rgba(242, 237, 228, 0.76);
	font-size: 0.9375rem;
	line-height: 1.75;
	text-shadow: var(--tf-lift);
}

.tf-trade__list strong {
	color: var(--tf-bone);
	font-weight: 600;
}

/* One row per sheet — it reads as a document index, which is what it is. */
.tf-trade__sheets {
	display: grid;
	gap: 1px;
	background: var(--tf-hair-soft);
	border: 1px solid var(--tf-hair-soft);
	border-radius: 24px 4px 24px 4px;
	overflow: hidden;
}

.tf-trade__sheet {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 1rem;
	padding: 1rem 1.35rem;
	background: rgba(10, 9, 8, 0.78);
	text-decoration: none;
	transition: background 0.3s var(--tf-ease);
}

.tf-trade__sheet:hover { background: rgba(169, 104, 63, 0.14); }

.tf-trade__sheet .no {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.625rem;
	letter-spacing: 0.2em;
	color: var(--tf-oxide-lt);
}

.tf-trade__sheet .nm {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.0625rem;
	color: var(--tf-bone);
}

.tf-trade__sheet .go {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(242, 237, 228, 0.45);
	white-space: nowrap;
}

.tf-trade__sheet:hover .go { color: var(--tf-oxide-lt); }

@media (max-width: 560px) {
	.tf-trade__sheet { grid-template-columns: 4.5rem minmax(0, 1fr); }
	.tf-trade__sheet .go { display: none; }
}
