:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --text: #122033;
    --muted: #5e6b7a;
    --primary: #0e8b84;
    --secondary: #f55f3d;
    --border: #d8e2ef;
    --shadow: 0 16px 32px rgba(14, 24, 39, 0.08);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background: var(--bg);
}

.site-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(800px 240px at 15% -5%, rgba(14, 139, 132, 0.18), transparent),
        radial-gradient(620px 260px at 100% 0%, rgba(245, 95, 61, 0.14), transparent);
    z-index: -1;
}

.wrap {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: rgba(244, 247, 251, 0.9);
    backdrop-filter: blur(8px);
}

.topbar-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    color: var(--text);
    font-family: "Fraunces", serif;
    font-size: 1.35rem;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.public-nav a:hover {
    color: var(--primary);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.3rem;
    color: var(--muted);
    font-weight: 600;
}

.lang-switch > span {
    color: #93a3b5;
}

.lang-switch a {
    color: var(--muted);
    font-weight: 700;
}

.lang-switch a.lang-active {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.public-main {
    padding: 2rem 0 3rem;
}

.hero {
    background: linear-gradient(135deg, #ffffff, #f2fbfb);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
    padding: clamp(1.3rem, 3vw, 2.2rem);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.4rem;
}

.hero h1 {
    margin: 0.4rem 0 0.8rem;
    font-family: "Fraunces", serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
}

.hero p {
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

.hero-badge {
    display: inline-block;
    background: rgba(14, 139, 132, 0.12);
    color: #0a625d;
    border-radius: 999px;
    padding: 0.28rem 0.78rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.94rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-secondary {
    background: rgba(14, 139, 132, 0.12);
    color: var(--text);
}

.public-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem 0.72rem;
    font: inherit;
    background: #fff;
}

.public-input:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(14, 139, 132, 0.14);
}

.hero-panel {
    border-radius: 18px;
    background: #0d1f32;
    color: #e4efff;
    padding: 1rem;
}

.hero-panel h3 {
    margin: 0;
    font-size: 0.96rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ab2d4;
}

.hero-panel ul {
    margin: 0.8rem 0 0;
    padding-left: 1rem;
    line-height: 1.7;
}

.section-title {
    margin: 2rem 0 0.9rem;
    font-size: 1.35rem;
    font-family: "Fraunces", serif;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.info-card,
.post-card,
.post-shell,
.post-content {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.info-card {
    padding: 1rem;
    background: var(--surface-soft);
}

.info-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.info-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.post-list {
    display: grid;
    gap: 0.9rem;
}

.post-card {
    padding: 1rem;
    box-shadow: var(--shadow);
}

.post-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
}

.post-card h2 {
    margin: 0.4rem 0;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
}

.post-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.post-card h2 a:hover {
    color: var(--primary);
}

.post-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.pager {
    display: flex;
    gap: 0.45rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pager a {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    min-width: 38px;
    padding: 0.45rem 0.6rem;
    text-align: center;
    font-weight: 700;
}

.pager a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.post-shell {
    padding: clamp(1rem, 3vw, 1.8rem);
    margin-top: 1rem;
}

.post-shell h1 {
    margin-top: 0.4rem;
    font-family: "Fraunces", serif;
    line-height: 1.2;
}

.post-content {
    margin-top: 1rem;
    padding: 1rem;
    line-height: 1.75;
}

.post-content h2,
.post-content h3 {
    font-family: "Fraunces", serif;
    margin-top: 1.1rem;
}

.post-content .affiliate-cta {
    margin-top: 1.2rem;
    border: 1px dashed #9ad7d3;
    border-radius: 12px;
    padding: 0.9rem;
    background: #effaf9;
}

.post-content .disclosure {
    font-size: 0.9rem;
    color: var(--muted);
}

.flash {
    margin-bottom: 0.8rem;
    border-radius: 11px;
    padding: 0.65rem 0.85rem;
    font-weight: 600;
}

.flash-success { background: #d9f5e7; color: #155a39; }
.flash-info { background: #e8f2ff; color: #21487d; }
.flash-error { background: #ffe8e8; color: #7f2525; }

.public-footer {
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.footer-inner {
    min-height: 66px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-inner p {
    margin: 0;
}

.footer-inner a {
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .public-nav {
        gap: 0.55rem;
        font-size: 0.86rem;
    }

    .topbar-inner {
        min-height: 58px;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        padding: 0.8rem 0;
    }
}
