/* ============================================================
   KK Studio blog: one reading design for every post.
   Loaded after each post's own <style> block, so it wins over the
   older per-post copies without touching the privacy and terms pages,
   which share the .legal-* class names. Colours come from studio.css
   (--text, --accent, --border …), so dark mode follows on its own.
   ============================================================ */

/* A narrow column of large, dark text reads best: about 65–72 characters a line. */
.legal-content .container, .legal-hero .container, .keep-reading .container { max-width: 720px; }

/* ---------- Header ---------- */
.legal-hero {
    padding: 128px 0 0;
    background: var(--bg);
    text-align: left;
}
.legal-hero .section-tag {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 18px; padding: 0; background: none;
    font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
}
.legal-hero .section-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legal-hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.1rem);
    font-weight: 800; line-height: 1.12; letter-spacing: -0.03em;
    color: var(--text); margin-bottom: 18px;
    text-wrap: balance;
}
.legal-hero .legal-meta {
    font-size: 0.9rem; color: var(--text-muted);
    padding-bottom: 28px; border-bottom: 1px solid var(--border);
}

/* ---------- Body ---------- */
.legal-content { padding: 36px 0 88px; }
.blog-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
    text-decoration: none; margin-bottom: 28px;
}
.blog-back:hover { color: var(--accent); }

.legal-content p,
.legal-content li {
    font-size: 1.125rem; line-height: 1.75; color: var(--text);
    text-wrap: pretty;
}
.legal-content p { margin-bottom: 1.25em; }
/* The opening paragraph is the summary: a touch larger. */
.legal-content .blog-back + p { font-size: 1.25rem; line-height: 1.65; margin-bottom: 1.4em; }

.legal-content h2 {
    font-size: clamp(1.45rem, 3vw, 1.75rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em;
    color: var(--text); margin: 2.4em 0 0.7em; text-wrap: balance;
}
.legal-content h2:first-of-type { margin-top: 1.6em; }
.legal-content h3 {
    font-size: 1.2rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em;
    color: var(--text); margin: 1.8em 0 0.5em; text-wrap: balance;
}
.legal-content strong { color: var(--text); font-weight: 700; }
.legal-content a {
    color: var(--accent); text-decoration: underline;
    text-decoration-thickness: 1px; text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.legal-content a:hover { text-decoration-color: var(--accent); }

/* Lists: the site resets bullets, so the posts put them back. */
.legal-content ul, .legal-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 0.45em; padding-left: 0.2em; }
.legal-content li::marker { color: var(--text-muted); }
.legal-content ul ul, .legal-content ol ol { margin: 0.4em 0 0.4em; }

.legal-content blockquote {
    margin: 1.6em 0; padding: 0.2em 0 0.2em 1.2em;
    border-left: 3px solid var(--accent);
    font-size: 1.2rem; line-height: 1.6; color: var(--text);
}
.legal-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.legal-content code { font-size: 0.92em; padding: 0.1em 0.35em; border-radius: 5px; background: var(--chip); }

/* ---------- Tables ---------- */
.tone-scroll {
    margin: 1.4em 0 2em; border: 1px solid var(--border); border-radius: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tone-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 0.98rem; }
.tone-table th, .tone-table td {
    padding: 12px 16px; text-align: left; vertical-align: top;
    border-bottom: 1px solid var(--border); color: var(--text); line-height: 1.55;
}
.tone-table thead th {
    background: var(--bg-alt); color: var(--text-muted);
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    white-space: nowrap;
}
.tone-table tbody tr:last-child td, .tone-table tbody tr:last-child th { border-bottom: 0; }
.tone-table tbody td:first-child { font-weight: 600; }
.tone-table .th { color: var(--text); font-size: 1.25rem; font-weight: 600; white-space: nowrap; }
.tone-table th[scope="row"] { color: var(--text); font-weight: 600; background: none; text-transform: none; letter-spacing: 0; font-size: 0.98rem; }

/* ---------- Figures ---------- */
.post-figure { margin: 1.6em 0 2.2em; }
.post-figure img { border-radius: 14px; border: 1px solid var(--border); }
.post-figure figcaption { margin-top: 12px; font-size: 0.88rem; line-height: 1.5; color: var(--text-muted); text-align: center; text-wrap: balance; }
.post-figure-phone { max-width: 280px; }
.post-figure-phone img { border-radius: 26px; }
.post-figure-pair { margin: 1.6em 0 2.2em; gap: 22px; }

/* ---------- The app box at the end ---------- */
.cta-banner {
    margin-top: 3em; padding: 28px; text-align: left;
    display: grid; grid-template-columns: 64px 1fr; column-gap: 20px; align-items: center;
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow-card);
}
.cta-banner-icon { grid-row: span 2; margin: 0; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); }
.legal-content .cta-banner h2 { margin: 0 0 4px; font-size: 1.3rem; line-height: 1.25; }
.legal-content .cta-banner p { margin: 0; font-size: 0.98rem; color: var(--text-muted); line-height: 1.55; text-wrap: balance; }
.cta-banner .cta-badges { grid-column: 2; justify-content: flex-start; margin-top: 18px; }
.cta-badge { height: 44px; width: auto; }

/* ---------- Keep reading ---------- */
.keep-reading { padding: 0 0 88px; }
.keep-reading .container { border-top: 1px solid var(--border); padding-top: 36px; }
.keep-reading h2 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.keep-reading-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.keep-reading-card {
    display: block; padding: 16px 0; border-radius: 0; background: none; border: 0;
    border-bottom: 1px solid var(--border); box-shadow: none; transition: none;
}
.keep-reading-card:hover { transform: none; box-shadow: none; }
.keep-reading-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); background: none; padding: 0; }
.keep-reading-title { display: block; margin-top: 4px; font-size: 1.08rem; font-weight: 700; line-height: 1.4; color: var(--text); text-wrap: balance; }
.keep-reading-card:hover .keep-reading-title { color: var(--accent); }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
    .legal-hero { padding-top: 104px; }
    .legal-hero .legal-meta { padding-bottom: 22px; }
    .legal-content { padding: 28px 0 64px; }
    .legal-content p, .legal-content li { font-size: 1.06rem; line-height: 1.72; }
    .legal-content .blog-back + p { font-size: 1.14rem; }
    .tone-table th, .tone-table td { padding: 10px 12px; font-size: 0.92rem; }
    .cta-banner { grid-template-columns: 52px 1fr; column-gap: 14px; padding: 22px 20px; }
    .cta-banner-icon { width: 52px; height: 52px; border-radius: 12px; }
    .cta-banner .cta-badges { grid-column: 1 / -1; }
    .post-figure-pair { gap: 12px; }
}

/* Text contrast: --text on --bg is 17:1 in light mode (#1a1a1a on white) and 16:1 in dark mode;
   the body text is --text, not --text-muted, for long reading. */

/* Boxes inside a post (a letter to copy, and the like) keep their own, smaller text. */
.legal-content .request-letter p { font-size: 1rem; line-height: 1.6; margin-bottom: 0.7em; }

/* An app box without the single icon (two apps side by side, for one) keeps a plain, centred layout. */
.cta-banner.cta-pair, .cta-banner:not(:has(> .cta-banner-icon)) { display: block; text-align: center; }
.cta-banner.cta-pair .cta-badges, .cta-banner:not(:has(> .cta-banner-icon)) .cta-badges { justify-content: center; margin-top: 14px; }
.legal-content .cta-pair > h2 { margin-bottom: 18px; text-wrap: balance; }
.legal-content .cta-pair .cta-app p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 4px; }
.legal-content .cta-pair .cta-more { margin-top: 18px; color: var(--text-muted); font-size: 0.95rem; }

/* Long titles stay readable on a phone without breaking into one-word lines. */
@media (max-width: 600px) {
    .legal-hero h1 { font-size: clamp(1.6rem, 6.6vw, 2.1rem); }
    .legal-content h2 { font-size: clamp(1.3rem, 5.6vw, 1.45rem); }
    .legal-content .cta-banner h2 { font-size: 1.12rem; }
}
