/* ═══ Smereka Tech — content pages ════════════════════════════════
   Loaded only by pages using the `page` layout, on top of styles.css.
   Every colour here comes from the :root tokens in styles.css.
   ═══════════════════════════════════════════════════════════════ */

.content {
    /* The text column. 820px, not the ~680px usual for a text-only article:
       a 360px float inside 680px leaves too little measure beside it to read
       as a column at all. */
    --prose-w: 820px;

    background: var(--paper);
    color: var(--ink);
}

.content > .inner {
    padding-top: 72px;
    padding-bottom: 96px;
}

/* ─── Draft banner ─────────────────────────────────────────────── */

.draft-banner {
    /* Dev-server only: draft pages never reach a production build.
       Deliberately off-palette so it can't be mistaken for the design. */
    max-width: var(--prose-w);
    margin-bottom: 40px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #b45309;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

/* ─── Title block ──────────────────────────────────────────────── */

.content-head {
    max-width: var(--prose-w);
    padding-bottom: 30px;
    margin-bottom: 44px;
    border-bottom: 1px solid var(--rule);
}

.lang-switch {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    margin-bottom: 18px;
}

.lang-switch:hover { color: var(--green-bright); }

.content-kicker {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--green-bright);
    margin-bottom: 18px;
}

.content-title {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: var(--green-deep);
}

.content-lede {
    margin-top: 22px;
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.55;
    color: var(--ink-soft);
}

/* ─── Prose ────────────────────────────────────────────────────── */

.prose {
    max-width: var(--prose-w);
    font-size: 17px;
    line-height: 1.72;
    color: var(--ink);
}

.prose::after { content: ""; display: block; clear: both; }

.prose > * + * { margin-top: 1.25em; }

.prose h2,
.prose h3 {
    color: var(--green-deep);
    letter-spacing: -0.015em;
    clear: both;   /* never let a heading wedge in beside a tall float */
}

.prose h2 { font-size: clamp(23px, 3vw, 29px); margin-top: 2.1em; line-height: 1.22; }
.prose h3 { font-size: clamp(18px, 2.2vw, 21px); margin-top: 1.8em; line-height: 1.3; }

.prose a {
    color: var(--green-bright);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.prose a:hover { color: var(--green-deep); }

.prose strong { font-weight: 600; color: var(--green-deep); }

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.5em; }

.prose blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 4px 0 4px 24px;
    border-left: 2px solid var(--green-bright);
    color: var(--ink-soft);
    font-size: 18px;
}

/* Beside a float, a block whose own box is visible — a quote's rule, a list's
   marker gutter — would otherwise slide under the image while only its text
   wrapped clear of it. A block formatting context makes the whole box avoid
   the float. Paragraphs need no such help: they have no box to misplace. */
.prose blockquote,
.prose ul,
.prose ol { display: flow-root; }

.prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 41, 18, 0.06);
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin-top: 2.6em;
    clear: both;
}

/* ─── Figures ──────────────────────────────────────────────────── */

.figure { margin: 0; }

.figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.figure-link {
    display: block;
    cursor: zoom-in;
}

.figure figcaption {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-muted);
}

.figure--full { margin-top: 2.4em; margin-bottom: 2.4em; }

.figure--left,
.figure--right {
    width: min(44%, 360px);
    /* Level with the adjacent paragraph's first line: the 1.25em block gap
       plus that line's half-leading, so the image top meets the text top. */
    margin-top: calc(1.25em + (1.72em - 1em) / 2);
    margin-bottom: 1.6em;
}

.figure--right { float: right; margin-left: 34px; }
.figure--left  { float: left;  margin-right: 34px; }

/* ─── Back link ────────────────────────────────────────────────── */

.content-back {
    max-width: var(--prose-w);
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
    clear: both;
}
.content-back a { color: var(--green-bright); font-size: 15px; }
.content-back a:hover { color: var(--green-deep); }

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 640px) {
    .content > .inner { padding-top: 48px; padding-bottom: 64px; }
    .content-head { margin-bottom: 34px; }

    /* Floats can't work at this width — a 44% column leaves no measure. */
    .figure--left,
    .figure--right {
        float: none;
        width: 100%;
        margin: 2em 0;
    }
}
