/* ==========================================================
   Buswaynora — clean blog theme
   ========================================================== */

:root {
    --accent:        #1a73e8;
    --accent-dark:   #1558b0;
    --text:          #1f2328;
    --text-muted:    #6b7280;
    --line:          #e6e8eb;
    --bg:            #ffffff;
    --bg-soft:       #f6f7f9;
    --max:           1180px;
    --radius:        10px;
    --sans:          'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    --serif:         Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 12px; top: 12px;
    background: #fff; padding: 8px 14px;
    z-index: 1000; border: 1px solid var(--line); border-radius: 6px;
}

/* ---------- Top bar ---------- */
.topbar {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.topbar__inner { display: flex; justify-content: flex-end; }
.topbar__links {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 20px;
}
.topbar__links a {
    display: block; padding: 8px 0;
    color: var(--text-muted);
}

/* ---------- Header ---------- */
.site-header { background: var(--bg); }
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding: 26px 20px 22px;
    flex-wrap: wrap;
}
.site-title {
    font-size: 32px; font-weight: 800; letter-spacing: -0.02em;
    color: var(--text); line-height: 1;
}
.site-title:hover { text-decoration: none; color: var(--accent); }
.site-tagline {
    margin: 6px 0 0; color: var(--text-muted);
    font-size: 14px;
}

/* Search */
.search-form { display: flex; align-items: stretch; }
.search-form input {
    border: 1px solid var(--line);
    border-right: 0;
    padding: 9px 14px;
    font-size: 14px;
    border-radius: 6px 0 0 6px;
    outline: none;
    min-width: 200px;
    font-family: inherit;
}
.search-form input:focus { border-color: var(--accent); }
.search-form button {
    border: 0; background: var(--accent); color: #fff;
    padding: 0 18px; font-size: 14px; cursor: pointer;
    border-radius: 0 6px 6px 0;
    font-family: inherit;
}
.search-form button:hover { background: var(--accent-dark); }

/* ---------- Nav ---------- */
.main-nav {
    background: var(--text);
    border-top: 3px solid var(--accent);
}
.main-nav .container { position: relative; }
.menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap;
}
.menu a {
    display: block; color: #f2f4f7;
    padding: 13px 16px; font-size: 14px; font-weight: 600;
}
.menu a:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.menu-toggle {
    display: none;
    background: none; border: 0; color: #fff;
    padding: 13px 0; font-size: 15px; font-weight: 600; cursor: pointer;
    font-family: inherit;
}

/* ---------- Layout ---------- */
.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding-top: 32px;
    padding-bottom: 48px;
    align-items: start;
}
.content { min-width: 0; }

/* ---------- Post cards ---------- */
.post-list { display: flex; flex-direction: column; gap: 30px; }

.post-card {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.post-card:last-child { border-bottom: 0; }

.post-card__cat {
    display: inline-block;
    font-size: 12px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.post-card__title {
    margin: 0 0 10px;
    font-size: 25px; line-height: 1.25; font-weight: 700;
    letter-spacing: -0.01em;
}
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--accent); text-decoration: none; }

.post-card__excerpt {
    margin: 0 0 12px; color: #3d4148;
    font-size: 16px;
}
.post-card__meta {
    font-size: 13px; color: var(--text-muted);
    display: flex; gap: 8px; align-items: center;
}
.meta-author { font-weight: 600; color: #4b5058; }

/* ---------- Single post ---------- */
.single-post { max-width: 100%; }
.single-post__title {
    font-size: 34px; line-height: 1.2; font-weight: 800;
    letter-spacing: -0.02em; margin: 10px 0 14px;
}
.single-post__body {
    font-family: var(--serif);
    font-size: 19px; line-height: 1.75; color: #23262b;
}
.single-post__body h2 {
    font-family: var(--sans);
    font-size: 24px; margin: 34px 0 12px; letter-spacing: -0.01em;
}
.single-post__body p { margin: 0 0 20px; }
.single-post__body ul, .single-post__body ol { margin: 0 0 20px; padding-left: 24px; }
.single-post__body li { margin-bottom: 8px; }

.related { margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--line); }

/* ---------- Archive header ---------- */
.archive-header { margin-bottom: 28px; }
.archive-header__eyebrow {
    font-size: 12px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--text-muted);
}
.archive-header__title {
    margin: 4px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
}

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}
.widget__title {
    margin: 0 0 14px; font-size: 17px; font-weight: 700;
    padding-bottom: 10px; border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li {
    padding: 9px 0; border-bottom: 1px solid var(--line);
    font-size: 15px;
}
.widget-list li:last-child { border-bottom: 0; }
.widget-list a { color: var(--text); }
.widget-list a:hover { color: var(--accent); }

/* ---------- Ads ---------- */
.ad { margin: 24px 0; text-align: center; }
.ad--header { margin: 20px 0 0; }
.ad__label {
    display: block; font-size: 10px; letter-spacing: .1em;
    text-transform: uppercase; color: #9aa0a6; margin-bottom: 6px;
}
.ad__placeholder {
    margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px;
    background: repeating-linear-gradient(45deg, #f0f1f3, #f0f1f3 10px, #e9eaed 10px, #e9eaed 20px);
    border: 1px dashed #c4c8cd;
    border-radius: 8px;
    color: #7a7f86; font-size: 14px; font-weight: 600;
    padding: 20px;
}
.ad__placeholder small { font-weight: 400; font-size: 11px; color: #9aa0a6; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex; gap: 8px; margin-top: 36px; flex-wrap: wrap;
}
.pagination__item {
    min-width: 40px; text-align: center;
    padding: 9px 12px; border: 1px solid var(--line);
    border-radius: 6px; font-size: 14px; font-weight: 600;
    color: var(--text);
}
.pagination__item:hover { border-color: var(--accent); text-decoration: none; }
.pagination__item.is-current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Misc ---------- */
.no-results { color: var(--text-muted); font-size: 18px; padding: 30px 0; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--text);
    color: #c8ccd2;
    padding: 30px 0;
    margin-top: 20px;
}
.site-footer__inner { text-align: center; }
.footer-links {
    list-style: none; margin: 0 0 12px; padding: 0;
    display: flex; gap: 24px; justify-content: center;
}
.footer-links a { color: #c8ccd2; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.copyright { margin: 0; font-size: 13px; color: #9aa0a6; }

/* ---------- Policy pages ---------- */
.policy-updated {
    font-family: var(--sans);
    font-size: 14px; color: var(--text-muted);
    padding: 6px 0 2px;
}
.cookie-consent-note {
    font-family: var(--sans);
    background: #eef4ff; border-left: 4px solid var(--accent);
    padding: 12px 16px; border-radius: 6px; font-size: 16px;
}
.policy-table {
    width: 100%; border-collapse: collapse; margin: 0 0 24px;
    font-family: var(--sans); font-size: 15px;
}
.policy-table th, .policy-table td {
    border: 1px solid var(--line); padding: 10px 12px; text-align: left;
    vertical-align: top;
}
.policy-table th { background: var(--bg-soft); font-weight: 700; }
.policy-table td:first-child { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; white-space: nowrap; }
.single-post__body h3 { font-family: var(--sans); font-size: 20px; margin: 26px 0 10px; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900;
    max-width: 760px; margin: 0 auto;
    background: #14181d; color: #eef0f2;
    border-radius: 12px; padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);
    flex-wrap: wrap;
}
.cookie-banner__text { margin: 0; font-size: 15px; flex: 1 1 260px; }
.cookie-banner__text a { color: #8ab4ff; }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner__btn {
    border: 0; cursor: pointer; font-family: inherit;
    background: var(--accent); color: #fff;
    padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.cookie-banner__btn:hover { background: var(--accent-dark); }
.cookie-banner__btn--ghost { background: transparent; border: 1px solid #3a4048; color: #c8ccd2; }
.cookie-banner__btn--ghost:hover { background: rgba(255,255,255,.06); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .site-header__inner { flex-direction: column; align-items: flex-start; }
    .search-form { width: 100%; }
    .search-form input { flex: 1; min-width: 0; }
    .site-title { font-size: 27px; }
    .single-post__title { font-size: 27px; }
    .single-post__body { font-size: 17px; }
    .post-card__title { font-size: 21px; }

    .menu-toggle { display: block; }
    .menu {
        display: none; flex-direction: column;
        padding-bottom: 8px;
    }
    .menu.is-open { display: flex; }
    .menu a { padding: 11px 4px; border-top: 1px solid rgba(255,255,255,.08); }
}
