/* Layered on vendor/@picocss/pico@2.1.1/pico.min.css, matching the palette
   and conventions of atindriyaghosh/tools's common-styles.css */

/* tools/ never touches Pico's own (fluid, up to 131.25% of 16px on wide
   viewports) root font-size — it relies entirely on hand-set per-element
   sizes like .card's below, layered on top of the unmodified root. Pinning
   the root here too would shrink those same rem values below what tools/
   actually renders, so leave it alone; only tighten spacing. */
:root {
    --pico-spacing: 0.85rem;
}

a {
    color: #6b8dd6;
}

a.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: bold;
    padding: 0.4rem 0.6rem;
    border-radius: var(--pico-border-radius);
    transition: all 0.2s;
    color: #6b8dd6;
    text-decoration: none;
}

a.back-link:hover {
    background-color: rgba(107, 141, 214, 0.1);
    color: #5b7dc6;
}

/* Homepage link, lifted straight from tools/common-styles.css */
.home-link {
    text-align: left;
    margin-bottom: 0.5rem;
}

.home-link a {
    font-size: 0.75rem;
    color: var(--pico-muted-color);
    text-decoration: none;
}

.home-link a:hover {
    color: #6b8dd6;
    text-decoration: underline;
}

button,
[role="button"] {
    background-color: #6b8dd6;
    border-color: #6b8dd6;
    color: white;
}

button:hover,
[role="button"]:hover {
    background-color: #5b7dc6;
    border-color: #5b7dc6;
}

/* Card grid, lifted straight from tools/index.html's .tool-grid/.tool-card */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 0.5rem;
    background: var(--pico-card-background-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.card:hover {
    border-color: #6b8dd6;
}

.card h3 {
    margin-bottom: 0.15rem;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.card p {
    margin: 0;
    color: var(--pico-muted-color);
    font-size: 0.75rem;
    line-height: 1.3;
}

.toc {
    display: inline-block;
    font-size: 0.85rem;
    margin: 1rem 0;
    padding: 0.6rem 1rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    background: var(--pico-card-background-color);
}

.toc strong {
    display: block;
    margin-bottom: 0.3rem;
}

/* Pico styles any nav > ul as a horizontal flex row for navbars; reset
   that back to a normal nested list for this one. */
.toc ul {
    display: block;
    margin: 0;
    padding-left: 1.1rem;
    list-style: disc;
}

.toc li {
    display: list-item;
    padding: 0;
}

.toc a {
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

.pattern-tag {
    display: inline-block;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 999px;
    padding: 0.15rem 0.75rem;
    margin: 0 0.4rem 0.4rem 0;
    font-size: 0.85rem;
}
