/*
 * links.css: styles for the links directory.
 * Generated by urllogger; edits will be overwritten on the next build.
 * Every selector is scoped to .ll so nothing here can affect main.css.
 */

@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.ll {
    --ll-red: #c91e00;
    --ll-red-dark: #9a1700;
    --ll-orange: #ff8236;
    --ll-pink: #ffd7d7;
    --ll-pink-soft: #fff4f1;
    --ll-ink: #1d1b1a;
    --ll-muted: #5f5957;
    --ll-line: #e7dfdc;
    --ll-shade: #f7f3f2;
    --ll-radius: 8px;
    margin: 0 0 1.5rem;
    color: var(--ll-ink);
    font-family: "Roboto", Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.ll *,
.ll *::before,
.ll *::after {
    box-sizing: border-box;
}

.ll [hidden] {
    display: none !important;
}

.ll a {
    color: var(--ll-red);
}

.ll a:hover {
    color: var(--ll-red-dark);
}

.ll a:focus-visible,
.ll input:focus-visible {
    outline: 3px solid var(--ll-orange);
    outline-offset: 2px;
}

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

/* Introduction */

.ll-intro {
    margin: 0.5rem 0 1.25rem;
}

.ll-lede {
    margin: 0 0 0.3rem;
    font-size: 1.1em;
}

.ll-stats {
    margin: 0;
    color: var(--ll-muted);
    font-size: 0.9em;
}

/* Subject index */

.ll-toc {
    margin: 0 0 1.25rem;
    padding: 0.9rem 1rem 1rem;
    background: var(--ll-pink-soft);
    border: 1px solid var(--ll-pink);
    border-left: 4px solid var(--ll-red);
    border-radius: var(--ll-radius);
}

.ll-toc-title,
.ll-filter-label {
    display: block;
    margin: 0 0 0.6rem;
    color: var(--ll-muted);
    font-size: 0.78rem;
    font-weight: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ll-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ll-toc-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.3em 0.4em 0.3em 0.85em;
    color: var(--ll-ink);
    font-size: 0.9em;
    line-height: 1.3;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--ll-line);
    border-radius: 999px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.ll-toc-list a:hover {
    color: var(--ll-red);
    border-color: var(--ll-red);
}

.ll-toc-count {
    min-width: 1.8em;
    padding: 0.05em 0.45em;
    color: #ffffff;
    font-size: 0.78em;
    text-align: center;
    background: var(--ll-red);
    border-radius: 999px;
}

/* Filter box (shown only when JavaScript is available) */

.ll-filter {
    margin: 0 0 1.75rem;
}

.ll-filter-label {
    margin-bottom: 0.35rem;
}

.ll-filter-input {
    width: 100%;
    padding: 0.6em 0.8em;
    color: inherit;
    font: inherit;
    background: #ffffff;
    border: 1px solid #8f8683;
    border-radius: 6px;
}

.ll-filter-input:focus {
    border-color: var(--ll-red);
}

.ll-filter-status {
    min-height: 1.5em;
    margin: 0.35rem 0 0;
    color: var(--ll-muted);
    font-size: 0.85em;
}

/* Subject sections */

.ll-section {
    margin: 0 0 2.5rem;
    scroll-margin-top: 1rem;
}

.ll-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--ll-red);
}

.ll-section-title {
    margin: 0;
    font-size: 1.6em;
    font-weight: normal;
    line-height: 1.2;
}

.ll-section-count {
    color: var(--ll-muted);
    font-size: 0.9em;
}

.ll-section-desc {
    margin: -0.4rem 0 1rem;
    color: var(--ll-muted);
}

.ll-top {
    margin: 0.9rem 0 0;
    font-size: 0.85em;
    text-align: right;
}

/* Link cards */

.ll-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ll-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--ll-line);
    border-radius: var(--ll-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ll-card:hover {
    border-color: var(--ll-orange);
    box-shadow: 0 6px 18px rgba(201, 30, 0, 0.12);
    transform: translateY(-2px);
}

/* A 16:10 box: padding percentages are relative to the width. */
.ll-shot {
    display: block;
    position: relative;
    flex: none;
    height: 0;
    padding-top: 62.5%;
    overflow: hidden;
    text-decoration: none;
    background: var(--ll-shade);
    border-bottom: 1px solid var(--ll-line);
}

.ll-shot img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.ll-shot-none {
    background: linear-gradient(135deg, #fff4f1 0%, #ffd7d7 100%);
}

.ll-initial {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    color: var(--ll-red);
    font-size: 3.2rem;
    line-height: 1;
    text-align: center;
    transform: translateY(-50%);
}

.ll-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem 0.85rem;
}

.ll-card-title {
    margin: 0;
    font-size: 1.05em;
    font-weight: normal;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.ll-card-title a {
    color: var(--ll-ink);
    text-decoration: none;
}

.ll-card-title a:hover {
    color: var(--ll-red);
    text-decoration: underline;
}

.ll-host {
    margin: 0;
    color: var(--ll-muted);
    font-size: 0.82em;
    overflow-wrap: anywhere;
}

.ll-desc {
    margin: 0;
    font-size: 0.92em;
}

.ll-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ll-tags a {
    display: inline-block;
    padding: 0.1em 0.6em;
    color: var(--ll-muted);
    font-size: 0.75em;
    text-decoration: none;
    background: var(--ll-shade);
    border: 1px solid var(--ll-line);
    border-radius: 999px;
}

.ll-tags a:hover {
    color: var(--ll-red);
    border-color: var(--ll-red);
}

.ll-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.2rem 0.8rem;
    margin: auto 0 0;
    padding-top: 0.4rem;
    color: var(--ll-muted);
    font-size: 0.8em;
}

/* Links that have stopped working */

.ll-card-broken {
    background: #fffafa;
    border-color: #efc5bc;
}

.ll-card-broken .ll-shot img {
    filter: grayscale(100%);
    opacity: 0.55;
}

.ll-card-broken .ll-card-title a {
    color: var(--ll-muted);
}

.ll-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.15em 0.6em;
    color: #ffffff;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--ll-red);
    border-radius: 999px;
}

.ll-status {
    margin: 0;
    padding: 0.35rem 0.55rem;
    color: #7a1300;
    font-size: 0.82em;
    background: var(--ll-pink-soft);
    border-left: 3px solid var(--ll-red);
}

.ll-status-label {
    display: block;
    color: var(--ll-red);
}

.ll-empty {
    padding: 2rem 1rem;
    color: var(--ll-muted);
    text-align: center;
    border: 1px dashed var(--ll-line);
    border-radius: var(--ll-radius);
}

@media (max-width: 30em) {
    .ll-cards {
        grid-template-columns: 1fr;
    }

    .ll-shot-none {
        padding-top: 30%;
    }

    .ll-section-title {
        font-size: 1.35em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ll-card,
    .ll-toc-list a {
        transition: none;
    }

    .ll-card:hover {
        transform: none;
    }
}

@media print {
    .ll-filter,
    .ll-top,
    .ll-shot {
        display: none;
    }

    .ll-card {
        break-inside: avoid;
        box-shadow: none;
    }
}
