/* forthelolz theme: palette "Blue & violet" from the site mockup */
:root {
    --bg: #0E1217;
    --bg-deep: #0A0D11;
    --card: #161C24;
    --border: #26303B;
    --field: #2E3A48;
    --text: #E6EAEF;
    --muted: #B7C0CB;
    --meta: #9AA5B1;
    --tech: #60A5FA;
    --tech-tint: #14243A;
    --tech-tint-text: #A9CBF5;
    --family: #C084FC;
    --family-tint: #2A1C3D;
    --family-tint-text: #D9B8FB;
    /* per-section accent: defaults to tech, .tag-family switches it */
    --accent: var(--tech);
    --tint: var(--tech-tint);
    --tint-text: var(--tech-tint-text);
    --font-head: "Space Grotesk", system-ui, sans-serif;
    --font-body: Inter, system-ui, sans-serif;
    --ghost-accent-color: #60A5FA;
}
.tag-family { --accent: var(--family); --tint: var(--family-tint); --tint-text: var(--family-tint-text); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.2; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
:focus-visible { outline: 2px solid var(--tech); outline-offset: 2px; }

/* top bar */
.topbar { background: var(--bg-deep); color: #C9D1DB; font-size: 13px; }
.topbar-inner { padding-top: 8px; padding-bottom: 8px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.topbar a { color: #fff; padding: 6px 4px; }
.search-btn { display: flex; align-items: center; gap: 8px; background: #1B2430; border: 0; border-radius: 6px; padding: 6px 10px; color: #C9D1DB; font: inherit; cursor: pointer; min-width: 190px; }
.search-btn:hover { color: #fff; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.header-inner { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 28px; letter-spacing: -0.5px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .dot { color: var(--tech); }
.logo-sm { font-size: 22px; color: #fff; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.main-nav a { padding: 10px 14px; }
.main-nav .nav-tech { color: var(--tech); }
.main-nav .nav-family { color: var(--family); }
.main-nav .nav-wow { padding: 9px 16px; border: 1px solid rgba(143, 211, 255, 0.45); color: #8FD3FF; border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.main-nav .nav-wow:hover { text-decoration: none; background: #12293B; border-color: #8FD3FF; }
.main-nav .nav-members { padding: 10px 18px; background: var(--text); color: var(--bg); border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.home-template .main-nav a:first-child,
.page-about .main-nav a[href$="/about/"] { border-bottom: 2px solid var(--text); }

/* shared bits */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.kicker { font-size: 12px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; }
.caps { letter-spacing: 1px; }
.meta { font-size: 13px; color: var(--meta); }
.lede { margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 760px; }
.btn { display: inline-block; align-self: flex-start; padding: 12px 18px; border-radius: 8px; border: 0; background: var(--accent); color: var(--bg); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-family { background: var(--family); }
.empty-note { margin: 0; color: var(--meta); font-size: 15px; }
.ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--tint); color: var(--tint-text); font-size: 14px; font-family: var(--font-head); font-weight: 600; }

/* home layout */
.home { padding-top: 32px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.home-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.sidebar { flex: 1 1 300px; display: flex; flex-direction: column; gap: 24px; }

/* featured */
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-wrap: wrap; }
.feature-img { flex: 1 1 360px; min-height: 300px; display: flex; background: var(--tint); }
.feature-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-body { flex: 1 1 320px; padding: 32px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.feature-body h1 { font-size: 34px; line-height: 1.15; }
.feature-body p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* sections and cards */
.section { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 3px solid var(--accent); padding-bottom: 10px; }
.section-head h1 { font-size: 34px; }
.section-head h2 { font-size: 26px; }
.section-head a { font-size: 14px; font-weight: 600; color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.post-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card-img { display: flex; height: 150px; background: var(--tint); }
.tag-family .card-img, .post-card.tag-family .card-img { height: 170px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.card-body h3 { font-size: 19px; line-height: 1.25; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.card-body .meta { font-size: 12px; }

/* sidebar */
.side-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.side-card h2 { font-size: 18px; }
.side-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.signup { border-top: 3px solid var(--family); }
.signup label { font-size: 13px; color: var(--meta); }
.signup input { background: var(--bg); border: 1px solid var(--field); border-radius: 8px; padding: 12px; color: var(--text); font: inherit; font-size: 15px; }
.signup .btn { align-self: stretch; text-align: center; font-size: 15px; }
.form-msg { display: none; }
.signup.success .form-ok, .signup.error .form-err { display: block; }
.signup.error .form-err { color: #F9B4BF; }
.signup.loading .btn { opacity: .6; }
.recent { gap: 14px; }
.recent-item { display: flex; gap: 12px; align-items: center; font-size: 14px; line-height: 1.4; font-weight: 500; }
.recent-item .thumb { width: 56px; height: 56px; flex: none; border-radius: 8px; background: var(--tint); object-fit: cover; }

/* archive pages */
.archive { padding-top: 40px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }

/* single post / page */
.post-wrap { padding-top: 48px; padding-bottom: 72px; }
.post-wrap article { max-width: 760px; margin: 0 auto; }
.post-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.post-head h1 { font-size: 42px; line-height: 1.1; }
.post-image { margin: 0 0 32px; }
.post-image img { border-radius: 14px; width: 100%; }
.post-image figcaption, .gh-content figcaption { font-size: 13px; color: var(--meta); text-align: center; margin-top: 8px; }
.gh-content { font-size: 18px; line-height: 1.75; color: #D5DBE2; }
.gh-content > * { margin: 0 0 1.3em; }
.gh-content h2 { font-size: 28px; margin-top: 1.6em; color: var(--text); }
.gh-content h3 { font-size: 22px; margin-top: 1.4em; color: var(--text); }
.gh-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gh-content blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.gh-content code { font-size: .88em; background: #1B2430; padding: 2px 6px; border-radius: 4px; }
.gh-content pre { background: var(--bg-deep); border: 1px solid var(--border); border-radius: 10px; padding: 18px; overflow-x: auto; font-size: 15px; line-height: 1.55; }
.gh-content pre code { background: none; padding: 0; }
.gh-content hr { border: 0; border-top: 1px solid var(--border); }
.gh-content img { border-radius: 10px; }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.gh-content th, .gh-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }

/* Ghost editor card widths (required by Ghost) */
.kg-width-wide { position: relative; width: min(1040px, 92vw); left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); }
.kg-width-full img { border-radius: 0; }

/* members-only call to action inside posts */
.gh-post-upgrade-cta { background: var(--card) !important; border: 1px solid var(--border); border-radius: 14px; }
.gh-post-upgrade-cta-content { background: var(--family-tint) !important; }

/* about page */
.about { padding-top: 40px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 48px; }
.about-intro { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.about-intro h1 { font-size: 42px; line-height: 1.1; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.flow-step { flex: 1 1 150px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.flow-step span { font-size: 13px; color: var(--meta); }
.flow-end { background: var(--tech-tint); border-color: var(--tech); }
.flow-end span { color: var(--muted); }
.machines { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.machine { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.machine h3 { font-size: 24px; }
.machine .meta { font-size: 14px; }
.machine p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.machine-img { height: 120px; border-radius: 10px; background: var(--tint); display: flex; align-items: center; justify-content: center; color: var(--accent); font-family: var(--font-head); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 5px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--field); font-size: 13px; }
.buildlog { padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.buildlog > div { display: flex; flex-direction: column; gap: 4px; }
.buildlog h2 { font-size: 20px; }
.buildlog span { font-size: 15px; color: var(--muted); }

/* pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--meta); font-size: 14px; }
.pagination a { color: var(--accent); font-weight: 600; }

/* footer */
.site-footer { background: var(--bg-deep); color: #C9D1DB; }
.footer-inner { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }

/* phones */
@media (max-width: 640px) {
    .feature-body { padding: 22px; }
    .feature-body h1 { font-size: 26px; }
    .post-head h1, .about-intro h1 { font-size: 32px; }
    .gh-content { font-size: 17px; }
    .main-nav a { padding: 8px 10px; }
    .search-btn { min-width: 0; }
    .flow-arrow { transform: rotate(90deg); margin: 0 auto; }
    .flow-step { flex-basis: 100%; }
}
