:root {
    --bg: #f2f7f3;
    --ink: #10271c;
    --muted: #5a6f63;
    --brand: #0c6b42;
    --brand-dark: #084f31;
    --brand-soft: #d7efe3;
    --line: #d3e4da;
    --paper: #fbfefc;
    --accent: #c9891a;
    --shadow: 0 18px 40px rgba(16, 39, 28, 0.08);
    --radius: 18px;
    --font-display: "Fraunces", "Source Serif 4", Georgia, serif;
    --font-ui: "Figtree", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-display);
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 8% -8%, rgba(12, 107, 66, 0.16), transparent 60%),
        radial-gradient(700px 360px at 92% 8%, rgba(201, 137, 26, 0.12), transparent 55%),
        linear-gradient(180deg, #eaf5ee 0%, var(--bg) 32%, #eef5f1 100%);
    line-height: 1.65;
    min-height: 100vh;
}

a { color: var(--brand-dark); }
img { max-width: 100%; height: auto; display: block; }

.site-main {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 72px;
}

/* —— Compact home intro (no huge green block) —— */
.home-hero {
    padding: 28px 0 8px;
    color: var(--ink);
    background: none;
    min-height: 0;
    width: auto;
    left: auto;
    right: auto;
    margin: 0;
    position: relative;
    display: block;
    animation: riseIn 500ms ease both;
}

.home-hero::after { display: none; }

.home-hero-inner {
    position: relative;
    z-index: 1;
    width: auto;
    margin: 0;
}

.home-hero .brand-mark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 10px;
    color: var(--ink);
}
.home-hero h1.brand-mark {
    font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.home-hero .brand-mark span {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.7em;
}

.home-hero .hero-line {
    max-width: 42rem;
    margin: 0 0 18px;
    font-size: 1.08rem;
    line-height: 1.5;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-ui);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brand);
    color: #fff !important;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 10px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.92rem;
    border: none;
    transition: transform 160ms ease, background 160ms ease;
    box-shadow: none;
}

.btn:hover { transform: translateY(-1px); background: var(--brand-dark); }
.btn-accent {
    background: #c9891a !important;
    color: #fff !important;
    border: 1px solid #c9891a !important;
}
.btn-accent:hover {
    background: #a87415 !important;
    border-color: #a87415 !important;
}
.btn-ghost {
    background: transparent;
    color: var(--brand-dark) !important;
    border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(12, 107, 66, 0.06); }
.btn-solid {
    background: var(--brand);
    color: #fff !important;
}

/* —— Sections —— */
.section {
    margin-top: 56px;
    animation: riseIn 650ms ease both;
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.section-head h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.section-kicker {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin: 0 0 8px;
}
.section-link {
    font-family: var(--font-ui);
    font-weight: 700;
    text-decoration: none;
    color: var(--brand-dark);
}
.section-link:hover { text-decoration: underline; }

.page-intro {
    padding: 36px 0 8px;
    animation: riseIn 500ms ease both;
}
.page-intro h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.page-intro .lead {
    margin: 0;
    max-width: 40rem;
    color: var(--muted);
    font-size: 1.1rem;
}

/* —— Article list (editorial, not heavy cards) —— */
.article-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
}
.article-feed > li {
    border-bottom: 1px solid var(--line);
}
.article-feed a.feed-item {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 22px;
    padding: 22px 4px;
    text-decoration: none;
    color: inherit;
    align-items: center;
    transition: background 160ms ease, transform 160ms ease;
}
.article-feed a.feed-item:hover {
    background: rgba(255, 255, 255, 0.55);
}
.feed-thumb {
    width: 148px;
    height: 108px;
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(145deg, var(--brand-soft), #fff),
        repeating-linear-gradient(90deg, rgba(12, 107, 66, 0.08) 0 8px, transparent 8px 16px);
}
.feed-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.feed-thumb--empty {
    display: grid;
    place-items: center;
    color: var(--brand);
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 1.4rem;
    opacity: 0.55;
}
.feed-meta {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 6px;
}
.feed-title {
    margin: 0 0 8px;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
}
.feed-item:hover .feed-title { color: var(--brand-dark); }
.feed-excerpt {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .article-feed a.feed-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px 0;
    }
    .feed-thumb { width: 100%; height: 160px; }
}

/* —— Article detail —— */
.article-detail {
    width: min(760px, 100%);
    margin: 0 auto;
    padding-top: 28px;
    animation: riseIn 550ms ease both;
}
.article-header h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4.5vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}
.article-meta {
    margin: 0 0 28px;
    font-family: var(--font-ui);
    color: var(--muted);
    font-size: 0.92rem;
}
.article-body {
    font-size: 1.12rem;
    background: rgba(251, 254, 252, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 36px);
    box-shadow: var(--shadow);
}
.article-body p { margin: 0 0 1.15em; }
.article-body h2, .article-body h3 {
    margin: 1.6em 0 0.55em;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.article-body ul, .article-body ol { padding-left: 1.25em; }
.article-body li { margin: 0.35em 0; }
.article-body img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.2em 0;
}
.article-hero-photo,
.article-inline-photo {
    margin: 0 0 28px;
    width: 100%;
}
.article-hero-photo img,
.article-inline-photo img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0;
}
.article-inline-photo {
    margin: 1.8em 0 2em;
}
.article-inline-photo img {
    max-height: 420px;
}
.article-hero-photo figcaption,
.article-inline-photo figcaption {
    margin: 8px 4px 0;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    color: var(--muted);
}
.article-body figure {
    margin: 1.6em 0;
}
.model-article .section-kicker a {
    color: inherit;
    text-decoration: none;
}
.model-article .section-kicker a:hover {
    text-decoration: underline;
}
.article-body a { text-underline-offset: 2px; }
.article-back {
    margin-top: 28px;
    font-family: var(--font-ui);
    font-weight: 700;
}
.article-back a { text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

.index-boost-related,
.related-block {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.index-boost-related h2,
.related-block h2 {
    font-size: 1.35rem;
    margin: 0 0 14px;
}
.index-boost-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    font-family: var(--font-ui);
}
.index-boost-list a {
    display: block;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(251, 254, 252, 0.85);
    font-weight: 650;
    color: var(--ink);
}
.index-boost-list a:hover {
    border-color: #b7d4c4;
    color: var(--brand-dark);
}

.sister-projects {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.sister-projects h2 {
    font-size: 1.35rem;
    margin: 0 0 14px;
}
.sister-projects-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    font-family: var(--font-ui);
}
.sister-projects-list a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(251, 254, 252, 0.9);
}
.sister-projects-list a:hover {
    border-color: #b7d4c4;
}
.sister-projects-list strong {
    display: block;
    color: var(--brand-dark);
    margin-bottom: 2px;
}
.sister-projects-list span {
    color: var(--muted);
    font-size: 0.92rem;
}

/* —— Sister / tools —— */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.tool-link {
    display: block;
    padding: 18px 18px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: rgba(251, 254, 252, 0.8);
    border: 1px solid var(--line);
    font-family: var(--font-ui);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.tool-link:hover {
    transform: translateY(-2px);
    border-color: #b7d4c4;
    box-shadow: var(--shadow);
}
.tool-link strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--brand-dark);
}
.tool-link span { color: var(--muted); font-size: 0.92rem; }

/* —— Static pages —— */
.prose {
    width: min(720px, 100%);
    margin: 28px auto 0;
    background: rgba(251, 254, 252, 0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(22px, 4vw, 36px);
    box-shadow: var(--shadow);
    animation: riseIn 500ms ease both;
}
.prose h1 {
    margin-top: 0;
    letter-spacing: -0.03em;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

/* —— Pager —— */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    font-family: var(--font-ui);
}
.pager a, .pager-current {
    min-width: 40px;
    text-align: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink);
}
.pager a:hover { border-color: var(--brand); color: var(--brand-dark); }
.pager-current {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 50;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 14px;
    background: #123226;
    color: #eef8f1;
    font-family: var(--font-ui);
    box-shadow: var(--shadow);
}
.cookie-banner a { color: #c7efd8; }
.cookie-banner button {
    font-family: var(--font-ui);
    font-weight: 700;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--accent);
    cursor: pointer;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes sunDrift {
    from { transform: translate3d(0, 0, 0); opacity: 0.7; }
    to { transform: translate3d(-4%, -3%, 0); opacity: 1; }
}

/* —— Kalkulačky —— */
.calc-hub-header { margin: 28px 0 20px; }
.calc-hub-header .lead,
.calc-page .lead {
    font-family: var(--font-ui);
    color: var(--muted);
    max-width: 46rem;
}
.calc-note { margin-top: 8px; }
.calc-list {
    list-style: none;
    margin: 28px 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 720px;
}
.calc-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    background: rgba(251, 254, 252, 0.95);
    transition: border-color 160ms ease, background 160ms ease;
}
.calc-row:hover {
    border-color: #c9a35a;
    background: #fff;
    color: var(--ink);
}
.calc-row-title {
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-dark);
}
.calc-row-blurb {
    grid-column: 1;
    grid-row: 2;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.45;
}
.calc-row-go {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 700;
}
.calc-back {
    font-family: var(--font-ui);
    margin: 18px 0 0;
}
.calc-form {
    display: grid;
    gap: 14px;
    max-width: 420px;
    margin: 20px 0 28px;
    font-family: var(--font-ui);
}
.calc-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    color: var(--ink);
}
.calc-form input,
.calc-form select {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.calc-form small {
    font-weight: 500;
    color: var(--muted);
}
.calc-result {
    max-width: 560px;
    padding: 18px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--brand-soft);
    font-family: var(--font-ui);
}
.calc-result h2 {
    font-size: 1.15rem;
    margin: 16px 0 10px;
}
.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.calc-table th,
.calc-table td {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(11, 92, 56, 0.15);
}
.calc-error { color: #8a1f1f; font-family: var(--font-ui); }
.calc-notes {
    margin: 12px 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
}
.calc-articles {
    margin: 40px 0 16px;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.calc-hub-more {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    margin: 8px 0 0;
}
.calc-article {
    padding-top: 8px;
    border-top: 1px solid var(--line);
}
.calc-article-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 0 0 12px;
    color: var(--ink);
}
.calc-article-body {
    font-family: var(--font-ui);
    color: var(--ink);
}
.calc-article-body iframe { display: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
