/*
 * China Kanta — the guides.
 *
 * Hand-written for the same reason every other `ck-*` sheet in this directory exists: the production
 * host has no node, so `public/build` is a committed Tailwind bundle that cannot gain a utility class
 * here. A class that has never been used anywhere in the repo compiles to nothing, and a page whose
 * layout depends on one does not break — it just collapses into a column of text and looks fine to
 * whoever wrote it. So everything below is namespaced `ckblog-` and lives on disk, where an editor can
 * read it and a cache-buster can prove it shipped.
 *
 * Mobile first, because the readers are on phones in Accra and Kumasi, and because these pages are
 * entered from a Google result on a data bundle: measure, rhythm and a legible body size carry the
 * whole design. No grid wider than one column until 720px, no webfont, no image bigger than the
 * text column.
 *
 * The brand red is #e31e24 and it is used sparingly — on the accent bar, the primary pill and the
 * links in a card title. A page that is red everywhere is a page that is nowhere.
 */

.ckblog-page {
    min-height: 100vh;
    background: #f7f8fa;
    color: #111827;
}

/* One measure for every block: 42rem of body text is roughly 70 characters at this size, which is the
   line length the reading research keeps arriving at, and the reason a guide reads like a guide rather
   than like a catalogue page. */
.ckblog-shell {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- hero ---------- */

.ckblog-hero {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 24px 0 28px;
}

.ckblog-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
}

.ckblog-crumbs a {
    color: #4b5563;
    text-decoration: none;
}

.ckblog-crumbs a:hover {
    color: #e31e24;
    text-decoration: underline;
}

.ckblog-crumbs span[aria-current="page"] {
    color: #111827;
    font-weight: 600;
}

.ckblog-h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.015em;
    color: #111827;
}

.ckblog-lede {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

.ckblog-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #6b7280;
}

/* ---------- body ---------- */

.ckblog-body {
    padding: 24px 0 44px;
}

/* ---------- the list ---------- */

.ckblog-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.ckblog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.ckblog-card-cover {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #f3f4f6;
}

.ckblog-card-body {
    display: flex;
    flex-direction: column;
    padding: 14px 16px 16px;
    flex: 1 1 auto;
}

.ckblog-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9ca3af;
}

.ckblog-card-title {
    margin: 8px 0 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: #111827;
}

.ckblog-card-title a {
    color: inherit;
    text-decoration: none;
}

.ckblog-card-title a:hover {
    color: #e31e24;
}

.ckblog-card-excerpt {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: #4b5563;
}

.ckblog-card-link {
    align-self: flex-start;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 2px solid #e31e24;
    font-size: 13px;
    font-weight: 700;
    color: #e31e24;
    text-decoration: none;
}

.ckblog-card-link:hover {
    text-decoration: underline;
}

.ckblog-empty {
    margin: 0;
    padding: 20px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    background: #fff;
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

/* The paginator is Laravel's own view, which is already on the account pages, so its classes are in
   the committed bundle. This only gives it room and keeps it off the brand red. */
.ckblog-pager {
    margin-top: 22px;
}

/* ---------- the article ---------- */

.ckblog-article .ckblog-body {
    padding-top: 20px;
}

.ckblog-cover-row {
    padding: 18px 0 0;
}

.ckblog-cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f3f4f6;
}

/* Body prose is RichEditor markup, so it is styled from the tag rather than from a class — the editor
   writes plain h2/h3/p/ul elements and knows nothing about this stylesheet. */
.ckblog-prose {
    font-size: 16px;
    line-height: 1.75;
    color: #1f2937;
}

.ckblog-prose > :first-child {
    margin-top: 0;
}

.ckblog-prose p {
    margin: 0 0 16px;
}

.ckblog-prose h2 {
    margin: 30px 0 10px;
    padding-left: 11px;
    border-left: 3px solid #e31e24;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 800;
    color: #111827;
}

.ckblog-prose h3 {
    margin: 24px 0 8px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #111827;
}

.ckblog-prose ul,
.ckblog-prose ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.ckblog-prose li {
    margin-bottom: 7px;
}

.ckblog-prose a {
    color: #e31e24;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ckblog-prose strong {
    font-weight: 700;
    color: #111827;
}

.ckblog-prose blockquote {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-left: 3px solid #d1d5db;
    background: #fff;
    border-radius: 0 12px 12px 0;
    color: #4b5563;
}

.ckblog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.ckblog-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    font-size: 15px;
}

.ckblog-prose th,
.ckblog-prose td {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
    background: #fff;
}

.ckblog-prose th {
    font-weight: 700;
    color: #111827;
    background: #f3f4f6;
}

/* ---------- the rail that sends a reader somewhere ---------- */

.ckblog-rail {
    margin-top: 30px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.ckblog-rail-title {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
}

.ckblog-rail-note {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: #4b5563;
}

.ckblog-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.ckblog-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.ckblog-pill:hover {
    border-color: #e31e24;
    color: #e31e24;
}

.ckblog-pill--primary {
    border-color: #e31e24;
    background: #e31e24;
    color: #fff;
}

.ckblog-pill--primary:hover {
    background: #b9161c;
    border-color: #b9161c;
    color: #fff;
}

/* ---------- wider screens ---------- */

@media (min-width: 720px) {
    .ckblog-shell {
        padding: 0 24px;
    }

    .ckblog-hero {
        padding: 34px 0 40px;
    }

    .ckblog-h1 {
        font-size: 34px;
    }

    .ckblog-lede {
        font-size: 16px;
        line-height: 1.75;
    }

    .ckblog-body {
        padding: 30px 0 56px;
    }

    /* Two columns, not three: at 42rem of measure a third card would be a 140px column and the
       excerpt would break every four words. The list is read as sentences, not scanned as tiles. */
    .ckblog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .ckblog-card-cover {
        height: 172px;
    }

    .ckblog-card-title {
        font-size: 18px;
    }
}
