:root {
    --page: #f6f4ef;
    --ink: #172026;
    --muted: #657075;
    --line: rgba(23, 32, 38, 0.14);
    --panel: rgba(255, 255, 255, 0.72);
    --panel-strong: #fffdf8;
    --accent: #4e5368;
    --accent-2: #8a5f7d;
    --shadow: 0 18px 50px rgba(30, 36, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background:
        linear-gradient(140deg, rgba(109, 125, 129, 0.16), transparent 34%),
        linear-gradient(320deg, rgba(138, 95, 125, 0.16), transparent 38%),
        var(--page);
    color: var(--ink);
    font-family: "Aptos", "Avenir Next", "Inter", "Segoe UI", system-ui, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.masthead {
    padding: 10px 0 4px;
}

.eyebrow,
.tool-kicker {
    margin: 0;
    color: var(--accent-2);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.masthead-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: end;
    padding-top: 8px;
}

h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.9rem);
    line-height: 0.9;
    font-weight: 820;
}

.intro {
    max-width: 620px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.45;
}

.site-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tool-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.thumb-link {
    display: block;
    overflow: hidden;
    background: #d9dedb;
    aspect-ratio: 4 / 3;
}

.thumb-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 180ms ease, filter 180ms ease;
}

.tool-card:hover .thumb-link img {
    transform: scale(1.025);
    filter: saturate(1.04) contrast(1.02);
}

.tool-copy {
    padding: 15px 15px 12px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
}

h2 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.05;
}

.tool-copy p:not(.tool-kicker) {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.42;
}

.open-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    margin: 0 12px 12px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--ink);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.open-link::after {
    content: ">";
    font-size: 1rem;
    line-height: 1;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
}

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

@media (max-width: 680px) {
    .shell {
        width: min(100% - 22px, 520px);
        padding-top: 18px;
    }

    .masthead-grid {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 14px;
    }

    .site-link {
        justify-self: start;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .tool-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
        align-items: stretch;
    }

    .thumb-link {
        aspect-ratio: auto;
        min-height: 100%;
    }

    .tool-copy {
        padding: 12px 12px 8px;
    }

    .open-link {
        grid-column: 2;
        min-height: 38px;
        margin: 0 10px 10px 12px;
    }

    .footer {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 430px) {
    .tool-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    h2 {
        font-size: 1.08rem;
    }

    .tool-copy p:not(.tool-kicker) {
        font-size: 0.86rem;
    }
}
