/* ── Static / Info Pages (about, privacy, terms, help, contact) ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: url('../assets/meadow-bg.png') center center / cover no-repeat fixed;
    color: #1e293b;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.25);
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ── Top bar ── */
.page-topbar {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid #D6CFBA;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 64px;
    box-shadow: 0 1px 8px rgba(59, 74, 47, 0.10);
}

.page-topbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #3B4A2F;
}

.topbar-wordmark {
    height: 36px;
    width: auto;
}

.topbar-piggy {
    height: 48px;
    width: auto;
    display: block;
}

.page-topbar-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-topbar-links a {
    color: #7A8C5E;
    text-decoration: none;
    font-size: .875rem;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.page-topbar-links a:hover { background: rgba(107, 126, 82, 0.10); color: #3B4A2F; }

.page-topbar-links a.btn-signin {
    border: 1px solid #D6CFBA;
}

/* ── Content wrapper ── */
.page-wrap {
    max-width: 760px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.page-card {
    background: rgba(255,255,255,.96);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
    padding: 48px 52px;
}

.page-card h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #6B7E52;
    margin-bottom: 6px;
    letter-spacing: -.5px;
}

.page-meta {
    font-size: .82rem;
    color: #64748b;
    margin-bottom: 36px;
}

.page-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 32px 0 10px;
}

.page-card h3 {
    font-size: .95rem;
    font-weight: 600;
    color: #6B7E52;
    margin: 20px 0 8px;
}

.page-card p {
    font-size: .925rem;
    line-height: 1.75;
    color: #334155;
    margin-bottom: 12px;
}

.page-card ul, .page-card ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.page-card li {
    font-size: .925rem;
    line-height: 1.75;
    color: #334155;
    margin-bottom: 4px;
}

.page-card a { color: #6B7E52; }

.page-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 32px 0;
}

/* ── Footer ── */
.page-footer {
    text-align: center;
    padding: 24px 20px 40px;
    font-size: .8rem;
    color: rgba(255,255,255,.9);
    background: rgba(30, 46, 18, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.page-footer a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    margin: 0 8px;
}

.page-footer a:hover { color: #fff; }

.page-footer-inner {
    margin-bottom: 10px;
}

.page-footer-disclaimer {
    font-size: .72rem;
    color: rgba(255,255,255,.65);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Contact form ── */
.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
    margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color .15s;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: #6B7E52; }

.contact-form textarea { resize: vertical; min-height: 130px; }

.btn-submit {
    background: linear-gradient(135deg, #6B7E52, #4A5C33);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    width: 100%;
}

.btn-submit:hover { opacity: .9; }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.form-notice {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .875rem;
    display: none;
}

.form-notice.success { background: #d1fae5; color: #065f46; display: block; }
.form-notice.error   { background: #fee2e2; color: #991b1b; display: block; }

/* ── Help accordion ── */
.help-section { margin-bottom: 8px; }

.help-q {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: .925rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background .15s;
}

.help-q:hover { background: #f1f5f9; }
.help-q.open  { background: #EFF4E8; border-color: #D6CFBA; color: #4A5C33; border-radius: 8px 8px 0 0; }

.help-q .arrow { transition: transform .2s; font-size: .75rem; }
.help-q.open .arrow { transform: rotate(180deg); }

.help-a {
    display: none;
    background: #fff;
    border: 1.5px solid #D6CFBA;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 14px 16px;
    font-size: .9rem;
    line-height: 1.7;
    color: #334155;
}

.help-a.open { display: block; }
.help-a ul   { padding-left: 18px; margin-top: 6px; }
.help-a li   { margin-bottom: 4px; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .page-card          { padding: 32px 24px; }
    .page-topbar        { padding: 0 16px; height: auto; min-height: 56px; flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
    .page-topbar-links  { gap: 4px; flex-wrap: wrap; }
    .page-topbar-links a { font-size: .8rem; padding: 5px 10px; }
    .page-card h1       { font-size: 1.5rem; }
    .page-wrap          { margin: 20px auto 40px; }
}

/* ── Guides index ───────────────────────────────────────────────────────────── */
.guides-hero {
    padding: 64px 20px 48px;
    text-align: center;
}
.guides-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3a1e;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(255,255,255,.8);
}
.guides-hero p {
    font-size: 1rem;
    color: #3d4f2a;
    max-width: 520px;
    margin: 0 auto;
    text-shadow: 0 1px 3px rgba(255,255,255,.8);
}
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 980px;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.guides-section-header {
    grid-column: 1 / -1;
    padding: 8px 0 4px;
    margin-top: 16px;
    border-bottom: 2px solid rgba(44, 58, 30, 0.15);
}
.guides-section-header:first-child {
    margin-top: 0;
}
.guides-section-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3a1e;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.guide-card {
    background: rgba(255,255,255,.96);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
    padding: 28px 28px 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .18s, box-shadow .18s;
}
.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}
.guide-card-tag {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6B7E52;
    margin-bottom: 10px;
}
.guide-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.4;
}
.guide-card p {
    font-size: .875rem;
    line-height: 1.65;
    color: #475569;
    flex: 1;
    margin-bottom: 18px;
}
.guide-card-meta {
    font-size: .78rem;
    color: #94a3b8;
}
.guide-card-read {
    display: inline-block;
    margin-top: 14px;
    font-size: .82rem;
    font-weight: 600;
    color: #6B7E52;
}

/* ── Article pages ──────────────────────────────────────────────────────────── */
.article-wrap {
    max-width: 780px;
    margin: 40px auto 60px;
    padding: 0 20px;
}
.article-breadcrumb {
    font-size: .8rem;
    color: #3d4f2a;
    margin-bottom: 16px;
    text-shadow: 0 1px 3px rgba(255,255,255,.8);
}
.article-breadcrumb a {
    color: #3d4f2a;
    text-decoration: none;
}
.article-breadcrumb a:hover { color: #1e293b; }
.article-breadcrumb span { margin: 0 6px; }
.article-card {
    background: rgba(255,255,255,.97);
    border-radius: 16px;
    box-shadow: 0 4px 28px rgba(0,0,0,.12);
    padding: 52px 60px;
}
.article-tag {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6B7E52;
    margin-bottom: 12px;
}
.article-card h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -.5px;
}
.article-byline {
    font-size: .8rem;
    color: #94a3b8;
    margin-bottom: 16px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
}

.article-disclaimer {
    font-size: .82rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 32px;
    line-height: 1.5;
}
.article-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 40px 0 12px;
}
.article-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #4A5C33;
    margin: 28px 0 8px;
}
.article-card p {
    font-size: .95rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 16px;
}
.article-card ul, .article-card ol {
    padding-left: 22px;
    margin-bottom: 16px;
}
.article-card li {
    font-size: .95rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 6px;
}
.article-card strong { color: #1e293b; }
.article-card a { color: #6B7E52; }
.article-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 36px 0;
}
.article-highlight {
    background: #f0f5ea;
    border-left: 4px solid #6B7E52;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 24px 0;
}
.article-highlight p { margin-bottom: 0; }

/* ── Article CTA box ── */
.article-cta {
    background: linear-gradient(135deg, #3B4A2F, #4A7C59);
    border-radius: 14px;
    padding: 36px 40px;
    margin-top: 48px;
    text-align: center;
}
.article-cta h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}
.article-cta p {
    font-size: .9rem;
    color: rgba(255,255,255,.82);
    margin-bottom: 22px;
    line-height: 1.6;
}
.article-cta a {
    display: inline-block;
    background: #fff;
    color: #3B4A2F;
    font-size: .95rem;
    font-weight: 700;
    padding: 13px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s;
}
.article-cta a:hover { background: #f0f5ea; }

/* ── Related guides ── */
.related-guides {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}
.related-guides h3 {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
    margin-bottom: 16px;
}
.related-guides ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-guides li { margin-bottom: 10px; }
.related-guides a {
    font-size: .9rem;
    color: #6B7E52;
    text-decoration: none;
    font-weight: 600;
}
.related-guides a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .article-card { padding: 32px 24px; }
    .article-card h1 { font-size: 1.5rem; }
    .article-cta { padding: 28px 24px; }
    .guides-hero h1 { font-size: 1.5rem; }
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */
[data-theme="dark"] body { color: #dde8cc; }
[data-theme="dark"] .page-topbar {
    background: rgba(23,29,19,.97);
    border-color: #364530;
}
[data-theme="dark"] .page-topbar-brand { color: #dde8cc; }
[data-theme="dark"] .page-topbar-links a { color: #8fa876; }
[data-theme="dark"] .page-topbar-links a:hover { background: rgba(107,126,82,.15); color: #dde8cc; }
[data-theme="dark"] .page-topbar-links a.btn-signin { border-color: #364530; }
[data-theme="dark"] .page-card {
    background: rgba(31,39,25,.96);
    box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
[data-theme="dark"] .page-card h2 { color: #dde8cc; }
[data-theme="dark"] .page-card p,
[data-theme="dark"] .page-card li  { color: #8fa876; }
[data-theme="dark"] .page-meta     { color: #8fa876; }
[data-theme="dark"] .page-divider  { border-color: #364530; }
[data-theme="dark"] .contact-form label { color: #8fa876; }
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    border-color: #364530;
    background: #263020;
    color: #dde8cc;
}
[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form textarea:focus { border-color: #8fab6e; }
[data-theme="dark"] .form-notice.success { background: rgba(34,197,94,.1);  color: #86efac; }
[data-theme="dark"] .form-notice.error   { background: rgba(239,68,68,.12); color: #fca5a5; }
[data-theme="dark"] .help-q {
    background: #263020;
    border-color: #364530;
    color: #dde8cc;
}
[data-theme="dark"] .help-q:hover { background: #2d3a22; }
[data-theme="dark"] .help-q.open  { background: #263020; border-color: #8fab6e; color: #8fab6e; }
[data-theme="dark"] .help-a {
    background: #1f2719;
    border-color: #364530;
    color: #8fa876;
}
