:root {
    color-scheme: light;
    --ink: #1f2926;
    --muted: #62706a;
    --surface: #fffefd;
    --line: #dce7df;
    --accent: #9a3f3f;
    --accent-dark: #173f36;
    --accent-soft: #f6e7e7;
    --shadow: 0 16px 40px rgba(23, 63, 54, 0.1);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    background: #173f36;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(154, 63, 63, 0.13), transparent 32rem),
        radial-gradient(circle at top right, rgba(31, 111, 97, 0.12), transparent 28rem),
        linear-gradient(180deg, #fbfffc 0%, #eef7f1 52%, #f7f4ef 100%);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(23, 63, 54, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(154, 63, 63, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

a {
    color: var(--accent);
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--accent-dark);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(35, 105, 90, 0.28);
    outline-offset: 2px;
}

/* ---------- Header ---------- */
header.site-header {
    color: #f8fffb;
    background:
        linear-gradient(135deg, rgba(13, 45, 38, 0.98), rgba(28, 83, 72, 0.95)),
        linear-gradient(90deg, var(--accent-dark), var(--accent));
    border-bottom: 1px solid rgba(248, 255, 251, 0.16);
    box-shadow: 0 12px 30px rgba(17, 54, 47, 0.24);
}

.header-inner {
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 22px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

header.site-header h1 {
    margin: 0;
    color: #f8fffb;
    font-size: clamp(1.45rem, 4vw, 2.35rem);
    line-height: 1.1;
}

.header-kicker {
    margin: 6px 0 0;
    color: #e8fff7;
    font-family: Arial, sans-serif;
    font-size: 0.94rem;
}

#installAppBtn {
    display: none;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(248, 255, 251, 0.38);
    border-radius: var(--radius);
    color: #f8fffb;
    background: rgba(248, 255, 251, 0.1);
    font: 700 0.95rem Arial, sans-serif;
    cursor: pointer;
    white-space: nowrap;
}

#installAppBtn:hover {
    background: rgba(248, 255, 251, 0.18);
}

/* ---------- Main content ---------- */
main {
    flex: 1;
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 26px 16px 46px;
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.card {
    position: relative;
    min-height: 128px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    border: 1px solid rgba(31, 111, 97, 0.16);
    border-radius: var(--radius);
    color: var(--ink);
    background: rgba(255, 254, 253, 0.9);
    box-shadow: 0 8px 24px rgba(23, 63, 54, 0.07);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--accent-dark);
}

.card::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(154, 63, 63, 0.18);
    border-radius: 50%;
    background:
        linear-gradient(135deg, transparent 47%, rgba(154, 63, 63, 0.18) 48%, rgba(154, 63, 63, 0.18) 52%, transparent 53%),
        rgba(246, 231, 231, 0.42);
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(154, 63, 63, 0.38);
    background: #fffefd;
    box-shadow: var(--shadow);
}

.card h2 {
    position: relative;
    margin: 0;
    padding-right: 36px;
    color: var(--accent-dark);
    font-size: clamp(1.1rem, 3.2vw, 1.35rem);
    line-height: 1.22;
    overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
footer.site-footer {
    padding: 28px 16px 30px;
    color: #d9eee8;
    background: #173f36;
    border-top: 1px solid rgba(248, 255, 251, 0.1);
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

footer.site-footer p {
    margin: 0 auto 10px;
}

footer.site-footer a {
    color: #ffd0d0;
    text-decoration: none;
    margin: 0 5px;
}

footer.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

footer.site-footer .verse {
    color: #cbe4dc;
    font-style: italic;
}

footer.site-footer .footer-links {
    max-width: 820px;
    line-height: 2;
}

footer.site-footer .visitors {
    margin-bottom: 0;
    color: #a9c5bc;
}

@media (max-width: 720px) {
    body {
        font-size: 16px;
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 14px;
    }

    #installAppBtn {
        width: 100%;
    }

    main {
        padding: 18px 12px 34px;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .card {
        min-height: 104px;
        padding: 16px;
    }
}
