/* ================================================================
   Directory — industry listing pages.
   Scoped under .lp so it inherits the landing page's tokens, and
   namespaced .dir-* so it never collides with landing.css or blog.css.
   ================================================================ */

.dir {
    padding-bottom: 96px;
}

/* ------------------------------------------------------- breadcrumb */

.dir-crumbs {
    padding-top: 28px;
    font-family: var(--lp-mono);
    font-size: 12px;
    color: var(--lp-faint);
}

.dir-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dir-crumbs li + li::before {
    content: "/";
    margin-right: 6px;
    color: var(--lp-ghost-soft);
}

.dir-crumbs a {
    color: var(--lp-muted);
}

.dir-crumbs li[aria-current] {
    color: var(--lp-ink);
}

/* ------------------------------------------------------------- head */

.dir-head {
    margin-top: 26px;
}

.dir-head__title {
    margin: 0 0 16px;
    font-family: var(--lp-serif);
    font-weight: 400;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.dir-head__title em {
    font-style: italic;
    color: var(--lp-green);
}

.dir-head__lede {
    max-width: 62ch;
    font-size: 17px;
    line-height: 1.55;
    color: var(--lp-body);
    text-wrap: pretty;
}

/* ------------------------------------------------------------ rule */

.dir-rule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 32px 0 14px;
}

.dir-rule__count {
    font-family: var(--lp-mono);
    font-size: 12px;
    color: var(--lp-muted);
    white-space: nowrap;
}

.dir-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dir-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border: 1px solid var(--lp-line-btn);
    border-radius: 999px;
    font-size: 13px;
    color: var(--lp-ink);
}

.dir-pill:hover {
    background: var(--lp-surface-mute);
    text-decoration: none;
}

.dir-pill.is-current {
    background: var(--lp-dark);
    border-color: var(--lp-dark);
    color: var(--lp-on-dark);
}

/* ------------------------------------------------------------ table */

.dir-table {
    border: 1px solid var(--lp-line-card);
    border-radius: 12px;
    background: var(--lp-surface);
    overflow: hidden;
}

.dir-table__scroll {
    overflow-x: auto;
}

.dir-table table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    text-align: left;
}

.dir-table__caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.dir-table thead th {
    padding: 12px 20px;
    border-bottom: 1px solid var(--lp-line-card);
    background: var(--lp-surface-mute);
    font-family: var(--lp-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--lp-muted);
}

.dir-table tbody td,
.dir-table tbody th {
    padding: 14px 20px;
    border-bottom: 1px solid var(--lp-line-row);
    font-size: 14px;
    font-weight: 400;
    vertical-align: middle;
}

.dir-table tbody tr:hover {
    background: var(--lp-surface-sunk);
}

.dir-table tfoot td {
    padding: 14px 20px;
    font-family: var(--lp-mono);
    font-size: 12px;
    color: var(--lp-faint);
}

.dir-col-rank {
    width: 56px;
    font-family: var(--lp-mono);
    font-size: 12px;
    color: var(--lp-ghost);
}

.dir-col-num {
    width: 96px;
    text-align: right;
    font-family: var(--lp-mono);
    font-size: 13px;
}

.dir-store {
    min-width: 220px;
}

.dir-store__name {
    display: block;
    font-weight: 500;
    color: var(--lp-ink);
}

.dir-store__host {
    display: block;
    margin-top: 2px;
    font-family: var(--lp-mono);
    font-size: 12px;
    color: var(--lp-faint);
}

.dir-industry {
    color: var(--lp-body);
}

/* Laid out inline rather than with flex: a flex td stops behaving as a table
   cell, and these two columns still have to size with the rest of the row. */
.dir-theme > span + span,
.dir-country > span + span {
    margin-left: 8px;
}

.dir-theme__none {
    color: var(--lp-ghost);
}

.dir-country__code {
    display: inline-block;
    vertical-align: middle;
    padding: 1px 5px;
    border: 1px solid var(--lp-line-btn);
    border-radius: 4px;
    font-family: var(--lp-mono);
    font-size: 11px;
    color: var(--lp-muted);
}

.dir-badge {
    display: inline-block;
    vertical-align: middle;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--lp-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dir-badge--paid {
    background: var(--lp-green-tint);
    border-color: var(--lp-green-line);
    color: var(--lp-green-ink);
}

.dir-badge--free {
    background: var(--lp-neutral-tint);
    border-color: var(--lp-line-btn);
    color: var(--lp-muted);
}

/* --------------------------------------------------------- inline ad */

/* Outranks `.dir-table tbody td`, which would otherwise keep its cell padding and
   inset the dark block in a frame of table background. The link paints the full
   cell, so the row rule underneath it has nothing left to separate. */
.dir-table tbody .dir-ad td {
    padding: 0;
    border-bottom: 0;
}

.dir-ad a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: var(--lp-dark);
    color: var(--lp-on-dark);
}

.dir-ad a:hover {
    background: var(--lp-green-dark);
    text-decoration: none;
}

.dir-ad__body {
    font-size: 15px;
}

.dir-ad__cta {
    font-size: 14px;
    font-weight: 500;
    color: var(--lp-mint);
    white-space: nowrap;
}

/* ------------------------------------------------------------- cards */

.dir-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.dir-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border: 1px solid var(--lp-line-card);
    border-radius: 12px;
    background: var(--lp-surface);
}

.dir-card:hover {
    border-color: var(--lp-rule);
    background: var(--lp-surface-sunk);
    text-decoration: none;
}

.dir-card__name {
    font-size: 17px;
    font-weight: 600;
    color: var(--lp-ink);
}

.dir-card__count {
    font-family: var(--lp-mono);
    font-size: 12px;
    color: var(--lp-green);
}

.dir-card__blurb {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--lp-muted);
}

/* --------------------------------------------------------------- cta */

.dir-cta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: end;
    gap: 32px;
    margin-top: 56px;
    padding: clamp(28px, 5vw, 56px);
    border-radius: 16px;
    background: var(--lp-dark);
    color: var(--lp-on-dark);
}

.dir-cta__file {
    margin-bottom: 16px;
    font-family: var(--lp-mono);
    font-size: 12px;
    color: var(--lp-on-dark-soft);
}

.dir-cta__title {
    margin: 0 0 14px;
    font-family: var(--lp-serif);
    font-weight: 400;
    font-size: clamp(32px, 4.5vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.dir-cta__title em {
    font-style: italic;
    color: var(--lp-mint);
}

.dir-cta__blurb {
    max-width: 48ch;
    font-size: 16px;
    line-height: 1.55;
    color: var(--lp-on-dark-soft);
    text-wrap: pretty;
}

.dir-cta__buy {
    display: flex;
    justify-content: flex-start;
}

.dir-cta__primary {
    padding: 15px 24px;
    border-radius: 9px;
    background: var(--lp-bg);
    color: var(--lp-ink);
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.dir-cta__primary:hover {
    background: #fff;
    color: var(--lp-ink);
    text-decoration: none;
}
