/* Spec 425: the public board game news page. The blocks, the FAQ and the pitch come from rules-pages.css and
   public-tools.css; this sheet holds the choices, the list of items and the page links. Every colour is a tabletop
   token, so the light and the dark theme both follow html[data-theme]. */

/* Rule 4: the choices and the page links, framed picks with the app's selected look. */
.pn-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
    margin: 0 0 0.75rem;
}

.pn-choice-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.pn-choice-label {
    margin-right: 0.2rem;
    color: var(--tt-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.rules-page .pn-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
    color: var(--tt-ink);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.rules-page a.pn-choice:hover {
    border-color: var(--tt-accent);
    color: var(--tt-ink);
}

.rules-page .pn-choice[aria-current] {
    border-color: var(--tt-accent);
    background: var(--tt-accent-soft);
}

.rules-page .pn-checked {
    margin: 0 0 1rem;
    color: var(--tt-muted);
    font-size: 0.9rem;
}

/* Spec 429: the items are the app's news cards (news-feed.css and the tabletop sheets) on the page's ground, the
   first one across the row as in the app. The title link covers the card, so the picture and the text open it too. */
/* Spec 438: the list keeps a block's gap to the next block (rules-pages.css .rules-block), pager or not. */
.rules-page .pn-feed.news-page {
    max-width: none;
    margin: 0 0 1rem;
    padding: 0;
    background: transparent;
}

.rules-page .pn-filters {
    margin-bottom: 1rem;
}

.rules-page .pn-list.news-grid {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pn-list > .news-card {
    position: relative;
    min-width: 0;
}

.pn-list > .news-card:first-child {
    grid-column: 1 / -1;
}

.rules-page .pn-list .news-card-meta-row,
.rules-page .pn-list .news-card-title,
.rules-page .pn-list .news-card-excerpt {
    margin: 0;
}

.rules-page .pn-list .news-card-title {
    font-family: var(--tt-font-text);
    font-size: 1rem;
}

.rules-page .pn-list > .news-card:first-child .news-card-title {
    font-size: 1.45rem;
    line-height: 1.25;
}

.rules-page .pn-list .news-card-title a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.pn-list .news-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.rules-page .pn-list .news-card-title a:focus-visible {
    outline: none;
}

.pn-list > .news-card:has(a:focus-visible) {
    outline: 2px solid var(--tt-accent);
    outline-offset: 2px;
}

.pn-list .news-card-picture {
    background: var(--tt-field);
}

/* The source badge in the app's per-source colour, the dark or the light shades. */
html.tabletop:not(#tabletop) .page.theme-dark .pn-list .news-card-source-name {
    background-color: hsl(var(--pn-hue) 40% 20%);
    color: hsl(var(--pn-hue) 60% 84%);
}

html.tabletop:not(#tabletop) .page.theme-light .pn-list .news-card-source-name {
    background-color: hsl(var(--pn-hue) 70% 93%);
    color: hsl(var(--pn-hue) 45% 26%);
}

.pn-list .news-keyword {
    border-color: var(--tt-line);
    color: var(--tt-muted);
}

.pn-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.1rem;
}

/* Spec 438 rule 13: the line with YouTube's Terms under the list. */
.rules-page .pn-youtube-terms {
    margin: 1rem 0 0;
    color: var(--tt-muted);
    font-size: 0.9rem;
    text-align: center;
}

.rules-page .pn-youtube-terms a {
    color: var(--tt-ink);
}

/* Rule 10: the sources, by language and kind. */
.rules-page .pn-source-groups {
    margin: 0;
}

.pn-source-groups dt {
    margin-top: 0.75rem;
    font-weight: 700;
}

.pn-source-groups dt:first-child {
    margin-top: 0;
}

.pn-source-groups dd {
    margin: 0.2rem 0 0;
    color: var(--tt-muted);
}
