/* The free web tools: the /tools/ page, and the parts every tool page shares (its icon by the
   "free tool" tag, and the "More free tools" strip at the bottom). Loaded after retro.css.
   The cards and strip are written by scripts/update_tool_pages.mjs. */

/* The icons are 20x20 pixel art, shown at 40px so each pixel is a whole 2x2. */

/* ── /tools/ ── */
.tools-hub > section.th-intro {
    display: grid;
    justify-items: start;
    gap: 16px;
    max-width: 900px;
    padding-bottom: 8px;
}

.th-intro .section-text { max-width: 38em; }

.tools-hub > section.th-group {
    max-width: 900px;
    padding-top: 36px;
    padding-bottom: 0;
}

.th-group-title {
    margin-bottom: 16px;
    font-size: 1.15rem;
}

.th-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.th-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.th-card:hover,
.th-card:focus-visible {
    transform: translate(-1px, -2px);
    box-shadow: 5px 6px 0 var(--ink);
}

.th-card:active {
    transform: translate(2px, 3px);
    box-shadow: 1px 1px 0 var(--ink);
}

.th-icon,
.tool-kicker-icon,
.tool-more-list img {
    flex: none;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 0 var(--ink));
}

.th-text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.th-name {
    font-weight: 700;
    font-size: 1.08rem;
    line-height: 1.3;
}

.th-desc {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.tools-hub > section.th-note {
    max-width: 900px;
    padding-top: 36px;
}

.th-note p { color: var(--muted); max-width: 40em; }
.th-note a { color: var(--link); font-weight: 700; }

/* ── On each tool page ── */
.tool-kicker {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tool-kicker .tag { margin: 0; }

main > section.tool-more {
    max-width: 900px;
    padding-top: 24px;
}

.tool-more-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-more-head h2 {
    font-size: 1.15rem;
}

.tool-more-head a {
    color: var(--link);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.tool-more-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tool-more-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 10px 12px;
    color: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.25;
    text-decoration: none;
    background: var(--panel);
    border: var(--line) solid var(--ink);
    border-radius: 10px;
}

.tool-more-list a:hover,
.tool-more-list a:focus-visible {
    background: var(--cream);
}

@media (max-width: 760px) {
    .th-grid { grid-template-columns: minmax(0, 1fr); }
    .tool-more-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-color-scheme: dark) {
    .tool-more-list a:hover,
    .tool-more-list a:focus-visible { background: var(--panel-raised); }
}

@media (prefers-reduced-motion: reduce) {
    .th-card { transition: none; }
}
