/*
 * bz-legacy.css — compatibility skin for recovered legacy Biznopedia pages (2008-2014).
 *
 * Those pages are table-based phpLD markup whose original stylesheets and images were never
 * recoverable from the Wayback Machine, so their class names (.smallDesc, .label, .link,
 * #linkDetail, .catBoxa, …) resolve to nothing. Rather than restore a dead 2010 stylesheet, the
 * content is rendered inside the modern layout and this sheet gives the old markup just enough
 * structure to read correctly.
 *
 * Everything is scoped under .bz-legacy so none of it can leak into the live site. Colours and
 * spacing come from the shared --cdl-* token contract, so this stays brand-neutral and follows
 * whichever token file the head loads.
 */

.bz-legacy__head {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cdl-border, #e5e7eb);
}

.bz-legacy__title {
    font-family: var(--cdl-font-display, inherit);
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    color: var(--cdl-ink-strong, #12275a);
    margin: 0 0 .5rem;
}

.bz-legacy__note {
    margin: 0;
    font-size: .9rem;
    color: var(--cdl-ink-muted, #6b7280);
}

.bz-legacy__note i {
    margin-right: .35rem;
}

/* ---- legacy body ------------------------------------------------------- */

.bz-legacy__body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--cdl-ink, #1f2937);
    /* Old pages set pixel widths on tables/images; never let them force a horizontal scrollbar. */
    overflow-x: auto;
}

.bz-legacy__body img {
    max-width: 100%;
    height: auto;
}

.bz-legacy__body a {
    color: var(--cdl-brand, #1d4ed8);
}

.bz-legacy__body h1,
.bz-legacy__body h2,
.bz-legacy__body h3,
.bz-legacy__body h4 {
    font-family: var(--cdl-font-display, inherit);
    color: var(--cdl-ink-strong, #12275a);
    margin: 1.5rem 0 .5rem;
    line-height: 1.3;
}

/* The archived h1/h2 duplicates the page heading we render above it. */
.bz-legacy__body > h1:first-child,
.bz-legacy__body > h2:first-child {
    display: none;
}

.bz-legacy__body p {
    margin: 0 0 1rem;
}

/* ---- phpLD table layouts ----------------------------------------------- */

/* These tables were used for layout, not data: strip their fixed widths and let them reflow. */
.bz-legacy__body table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
    margin: 0 0 1rem;
}

.bz-legacy__body td,
.bz-legacy__body th {
    padding: .5rem .75rem;
    vertical-align: top;
    border-bottom: 1px solid var(--cdl-border-subtle, #f1f3f7);
}

/* Detail pages are label/value rows (ID:, Title:, URL:, Category:, …). */
.bz-legacy__body td.label {
    width: 10rem;
    white-space: nowrap;
    font-weight: 600;
    color: var(--cdl-ink-muted, #6b7280);
}

.bz-legacy__body .smallDesc {
    color: var(--cdl-ink, #1f2937);
}

/* ---- category / listing grids ------------------------------------------ */

.bz-legacy__body .catBoxa,
.bz-legacy__body .phpld-gbox {
    display: inline-block;
    min-width: 14rem;
    margin: 0 1rem .5rem 0;
}

.bz-legacy__body .count,
.bz-legacy__body .phpld-gray {
    color: var(--cdl-ink-muted, #6b7280);
    font-size: .85rem;
}

.bz-legacy__body ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

/* Alt text kept in place of images that were never recovered. */
.bz-archive-imgtext {
    color: var(--cdl-ink-muted, #6b7280);
    font-size: .85rem;
    font-style: italic;
}
