/* Masthead */
.masthead { padding: 0 0 12px; }
.masthead h1 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 500; font-size: clamp(34px, 6vw, 46px);
    line-height: 1.08; letter-spacing: -.02em; margin-bottom: 14px;
}
.masthead p { color: var(--muted); max-width: 48ch; font-size: 18px; }

/* "Open My Screen" call to action (under the category heading) */
.cat-cta { margin: 2px 0 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ws-entry {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; text-decoration: none;
    color: #fff; background: var(--accent);
    border: 1px solid var(--accent); border-radius: 999px;
    padding: 10px 20px;
    transition: transform .15s, box-shadow .2s, filter .2s;
}
.ws-entry:hover { transform: translateY(-2px); box-shadow: var(--shadow); filter: brightness(1.05); }
.ws-entry-icon { font-size: 16px; line-height: 1; }
.ws-entry-note { font-size: 14px; color: var(--muted); }
.cat-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; text-decoration: none;
    color: var(--text); background: transparent;
    border: 1px solid var(--border); border-radius: 999px;
    padding: 10px 20px;
    transition: transform .15s, box-shadow .2s, border-color .2s;
}
.cat-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.cat-link-icon { font-size: 15px; line-height: 1; }

/* Category section */
section.cat { padding: 44px 0 0; }

.tools { list-style: none; display: grid; gap: 14px; }
@media (min-width: 620px) { .tools { grid-template-columns: 1fr 1fr; } }
.tools li { display: flex; position: relative; }

.tool, .cat-card {
    flex: 1; position: relative; display: block; text-decoration: none; color: inherit;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 22px 22px 48px;
    box-shadow: var(--shadow);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
/* cat-card has no bottom-pinned toggle button, so reclaim the reserved space */
.cat-card { padding-bottom: 22px; }
/* Drive the hover from the whole li so the card and its (sibling) toggle lift together. */
.tools li:hover .tool,
.tools li:hover .cat-card { border-color: var(--accent); transform: translateY(-3px); }
.tool h3, .cat-card h3 {
    font-size: 19px; font-weight: 600; margin: 0 0 7px;
    display: flex; align-items: center; gap: 8px;
}
.tool h3 .arrow, .cat-card h3 .arrow { color: var(--accent); transition: transform .2s; font-weight: 500; }
.tools li:hover h3 .arrow { transform: translateX(4px); }
.tool p, .cat-card p { font-size: 15px; color: var(--muted); line-height: 1.5; }
.cat-card .count { display: block; margin-top: 10px; font-size: 13px; color: var(--faint); }

/* Per-card "add to my screen" toggle: tag-sized, pinned bottom-right inside the card.
   It is a sibling of .tool (cannot nest a button in the <a>), positioned over the
   card's reserved bottom strip via the li's positioning context. */
.tool-add {
    position: absolute; right: 18px; bottom: 16px; z-index: 2;
    display: inline-flex; align-items: center; gap: 5px;
    font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
    padding: 3px 10px; border-radius: 999px;
    color: var(--accent-strong); background: var(--accent-weak);
    border: 1px solid transparent;
    transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.tools li:hover .tool-add { transform: translateY(-3px); }
.tool-add:hover { border-color: var(--accent); }
.tool-add[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
    font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
    background: var(--accent-weak); color: var(--accent-strong);
}

/* Tag group wrapper on the category page */
.group { margin-top: 2rem; }
.group > h2 {
    font-size: 1.1rem;
    margin: 0 0 .75rem;
    color: var(--muted, inherit);
}

/* Support link */
.support { margin-top: 48px; text-align: center; }
.bmc {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 500; text-decoration: none;
    color: var(--accent-strong); background: var(--accent-weak);
    border: 1px solid var(--border); border-radius: 999px;
    padding: 9px 18px;
    transition: border-color .2s, transform .15s, box-shadow .2s;
}
.bmc:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.bmc-cup { font-size: 16px; line-height: 1; }
