/* ─────────────────────────────────────────────────────────────────────────────
   brand.css: the Clearly marketing system (2026-10-05).

   Concept C ("Converge") decided the palette, the type and the voice;
   Concept D ("Inline") decided the shape. See LANDING-CONCEPTS.md for the
   rounds that got here and DESIGN.md §2.1 for the written rules.

   Shape: the DOG-EAR. One curve per shape: every card, button, tile and band
   has a single generous rounded corner and three sharp ones, like the turned
   corner of a page (Clearly is the report on your desk). Buttons swap which
   corner is curved on hover. Never pills, never four rounded corners, never
   plain square on a marketing surface.

   Two layers live here:
   1. The system proper (.mk-* and the primitives): for pages written on it.
   2. A legacy layer under body.mk-legacy: the guides, the audience pages and
      the auth pages were written on Tailwind utilities; this remaps their
      colour, type and radius utilities onto the system so they match without
      a rewrite. Specificity (body.mk-legacy …) is what beats Tailwind's own
      rules, not source order.
   ───────────────────────────────────────────────────────────────────────── */

:root {
    --bg:     #F6F1E7;   /* page: warm cream */
    --paper:  #FFFCF5;   /* cards */
    --ink:    #14221F;   /* text, ink buttons */
    --soft:   #4E5E59;   /* body copy on cream */
    --mute:   #8B9690;   /* eyebrows, fine print */
    --line:   #DED5C2;   /* hairlines */
    --hot:    #F2452A;   /* vermilion: the accent, the italic word, the primary button */
    --hot-d:  #D93D20;
    --hot-100: #FBD6CE;  /* the accent on deep teal, where vermilion fails contrast (the app palette's hot-100) */
    --deep:   #0E3B38;   /* deep teal: bands, the report card */
    --deep2:  #15504B;
    --mint:   #BFE3D8;   /* text on deep */
    --butter: #FFD56B;   /* the tag, the question chip, the final band */
    --r:      46px;      /* the one curve, large */
    --r-md:   26px;
    --r-sm:   18px;
    --r-xs:   12px;
    --font-display: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;   /* one family, display and body (2026-10-05: sans tried first, after Fraunces and Instrument Serif) */
    --font-body: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── Primitives ───────────────────────────────────────────────────────── */
.c-br { border-radius: 0 0 var(--r) 0; }
.c-tl { border-radius: var(--r) 0 0 0; }
.c-tr { border-radius: 0 var(--r) 0 0; }
.c-bl { border-radius: 0 0 0 var(--r); }
.r-md { --r: var(--r-md); }
.r-sm { --r: var(--r-sm); }
.r-xs { --r: var(--r-xs); }

.disp { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.0; text-wrap: balance; }
.disp em { font-style: italic; font-weight: 700; color: var(--hot); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }
.lead { color: var(--soft); margin: 22px 0 0; font-size: 19px; }
/* Guides and other re-skinned pages: a section lead runs the full column (2026-10-06). The marketing hero keeps its measure. */
.mk-legacy .lead { max-width: none; }
.fine { font-size: 14px; color: var(--mute); }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-body); font-weight: 700; font-size: 17px; line-height: 1.2;
    padding: 18px 30px 18px 26px; border: 0; cursor: pointer; text-decoration: none;
    border-radius: 0 0 var(--r-md) 0;
    transition: border-radius .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { border-radius: var(--r-md) 0 0 0; }
.btn-hot   { background: var(--hot); color: #fff; }
.mk-links a.btn-hot, .mk-links a.btn-hot:hover { color: #fff; }   /* never the nav's soft grey, whatever the page's cascade (2026-10-06) */
.btn-hot:hover { background: var(--hot-d); }
.btn-ink   { background: var(--ink); color: var(--bg); }
.btn-paper { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-white { background: #FFFCF5; color: var(--deep); }
/* `.mk a { color: inherit }` outranks a bare .btn-* class, so a dark button
   inherited dark text (the homepage's final call to action read ink on ink)
   and a white one inside a dark panel inherited light text (2026-10-09). */
.mk a.btn-ink   { color: var(--bg); }
.mk a.btn-white { color: var(--deep); }
.btn-sm    { padding: 12px 20px 12px 18px; font-size: 15px; border-radius: 0 0 var(--r-sm) 0; }
.btn-sm:hover { border-radius: var(--r-sm) 0 0 0; }
.btn-block { display: flex; width: 100%; }
.lift     { filter: drop-shadow(6px 6px 0 var(--ink)); }
.lift-hot { filter: drop-shadow(6px 6px 0 rgba(242, 69, 42, 0.35)); }

.tag { display: inline-block; background: var(--butter); padding: 8px 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; border-radius: 0 0 var(--r-sm) 0; }
.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 6px 11px; background: var(--deep2); color: var(--mint); border-radius: 0 0 var(--r-xs) 0; }
.card { background: var(--paper); padding: 30px; border-radius: 0 0 var(--r) 0; }
.card-deep { background: var(--deep); color: #F2FAF7; }
.card-deep .eyebrow { color: var(--mint); }
.tile { width: 38px; height: 38px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; border-radius: 0 0 var(--r-xs) 0; }
.tile img { width: 20px; height: 20px; object-fit: contain; }
.tiles { display: flex; gap: 6px; flex-wrap: wrap; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; color: var(--soft); }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 14px; background: var(--hot); border-radius: 0 0 7px 0; }

/* ── Page frame ───────────────────────────────────────────────────────── */
.mk { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.mk * { box-sizing: border-box; }
.mk a { color: inherit; text-decoration: none; }
.mk p { text-wrap: pretty; }
.mk section { padding-top: 110px; }
/* Section headings run the width of the column (2026-10-09). The 15ch cap
   wrapped every heading into a narrow block a third of the page wide; a
   heading now breaks where its words do, with no forced balance. */
.mk h2 { font-size: clamp(38px, 5vw, 72px); margin: 16px 0 0; max-width: none; text-wrap: pretty; }
.mk h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.mk :focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }

.mk-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 80px; gap: 24px; }
.mk-brand { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; white-space: nowrap; }
.mk-brand span { color: var(--hot); }
.mk-links { display: flex; gap: 28px; align-items: center; color: var(--soft); font-size: 16px; font-weight: 500; }
.mk-links a:hover { color: var(--ink); }
.mk-links a.is-on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--hot); }

.mk-band { background: var(--deep); color: #F2FAF7; padding: 100px 0; border-radius: 0 var(--r) 0 0; }
.mk-band .eyebrow { color: var(--mint); } .mk-band .lead { color: #B9D3CD; } .mk-band h2 em { color: var(--butter); }
.mk-final { margin-top: 120px; background: var(--butter); padding: 110px 0; border-radius: var(--r) 0 0 0; }
.mk-final h2 { font-size: clamp(46px, 7vw, 110px); max-width: 12ch; }
.mk-final p { font-size: 20px; margin: 22px 0 0; color: var(--soft); }
.mk-final .cta { margin-top: 36px; }
.cta { display: flex; gap: 16px; flex-wrap: wrap; }

.mk-footer { padding: 40px 0 56px; font-size: 14px; color: var(--mute); }
.mk-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 28px; }
.mk-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.mk-footer a:hover { color: var(--ink); }

/* Page hero (inner pages): a deep band with the title, like the landing's report card. */
.mk-hero { padding-top: 48px; padding-bottom: 8px; }
.mk-hero h1 { font-size: clamp(42px, 6vw, 88px); margin: 22px 0 0; max-width: 14ch; }


/* FAQ */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.faq > div { background: var(--paper); padding: 28px; border-radius: 0 0 var(--r-md) 0; }
.faq h3 { font-size: 24px; margin: 0 0 8px; }
.faq p { margin: 0; color: var(--soft); font-size: 17px; }

/* Pricing cards */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.price { background: var(--paper); padding: 34px; display: flex; flex-direction: column; border-radius: 0 0 var(--r) 0; }
.price.hot { background: var(--deep); color: #F2FAF7; }
.price.hot .eyebrow, .price.hot li, .price.hot .per, .price.hot .blurb { color: #B9D3CD; }
.price .eyebrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price .amt { font-family: var(--font-display); font-weight: 800; font-size: 72px; letter-spacing: -0.05em; line-height: 1; margin: 16px 0 2px; font-variant-numeric: tabular-nums; }
.price .per { font-size: 14px; color: var(--mute); }
.price .blurb { margin: 10px 0 0; font-size: 15px; color: var(--soft); }
.price ul { list-style: none; padding: 0; margin: 22px 0 18px; display: grid; gap: 10px; color: var(--soft); font-size: 16px; }
.price li { display: flex; align-items: center; gap: 10px; }
.price li img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.price li small { color: var(--mute); font-size: 13px; }
.price .tiles { margin: 0 0 28px; min-height: 38px; }
.price.hot .tile { background: #F2FAF7; }
.price .btn { margin-top: auto; }
.price.hot .btn { background: var(--butter); color: var(--ink); }
.badge { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; background: var(--butter); color: var(--ink); padding: 4px 9px; border-radius: 0 0 8px 0; }

/* Segmented control (billing interval, audience) */
.seg { display: inline-flex; background: var(--paper); padding: 4px; border-radius: 0 0 var(--r-sm) 0; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { font: inherit; font-weight: 700; font-size: 15px; padding: 8px 16px; border: 0; background: transparent; color: var(--soft); cursor: pointer; border-radius: 0 0 var(--r-xs) 0; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.seg button b { color: var(--hot); font-weight: 800; font-size: 12px; margin-left: 4px; }
.seg button[aria-selected="true"] b { color: var(--butter); }
.sel { font: inherit; font-weight: 700; color: var(--ink); background: var(--paper); border: 0; box-shadow: inset 0 0 0 2px var(--ink); padding: 10px 14px; border-radius: 0 0 var(--r-sm) 0; cursor: pointer; }

/* Source cards (integrations) */
.sources { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 44px; }
.source { background: var(--paper); padding: 26px; border-radius: 0 0 var(--r-md) 0; display: flex; gap: 18px; align-items: flex-start; }
.source .lg { width: 60px; height: 60px; flex: none; background: var(--bg); display: flex; align-items: center; justify-content: center; border-radius: 0 0 var(--r-sm) 0; }
.source .lg img { width: 30px; height: 30px; object-fit: contain; }
.source h3 { font-size: 24px; margin: 0; }
.source .status { display: inline-block; margin-left: 10px; vertical-align: 3px; font-family: var(--font-body); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hot); }
.source .status.pending { color: var(--mute); }
.source p { margin: 8px 0 0; color: var(--soft); font-size: 16px; }
.source.pending { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.source.pending .lg img { filter: grayscale(1); opacity: 0.7; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 52px; }
.step { background: var(--deep2); padding: 30px; border-radius: 0 0 var(--r) 0; }
.step .n { font-family: var(--font-display); font-weight: 800; font-size: 54px; line-height: 1; color: var(--butter); }
.step h3 { font-size: 28px; margin: 22px 0 8px; }
.step p { margin: 0; color: #B9D3CD; font-size: 17px; }
.step .tiles { margin-top: 20px; }
.step .tile { background: #F2FAF7; }

/* Deep CTA box on inner pages */
.mk-cta { margin-top: 56px; background: var(--deep); color: #F2FAF7; padding: 34px 36px; border-radius: 0 0 var(--r) 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mk-cta h3 { font-size: 30px; margin: 0; }
.mk-cta p { margin: 6px 0 0; color: #B9D3CD; font-size: 17px; }

@media (max-width: 900px) {
    .mk-links a:not(.btn):not([href="/login"]) { display: none; }   /* Sign in stays on phones (2026-10-16) */
    .mk h2 { max-width: none; }
    .faq, .prices, .sources, .steps { grid-template-columns: 1fr; }
    .mk section { padding-top: 84px; }
    .mk-band, .mk-final { padding: 72px 0; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ── Legacy layer: Tailwind-built pages re-skinned without a rewrite ──── */
body.mk-legacy { background: var(--bg); color: var(--ink); font-family: var(--font-body); }
body.mk-legacy h1, body.mk-legacy h2, body.mk-legacy h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; }
body.mk-legacy h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; }
body.mk-legacy h2 { letter-spacing: -0.02em; }
body.mk-legacy .prose h2, body.mk-legacy article h2 { font-size: 1.75rem; line-height: 1.15; }
body.mk-legacy .prose h3, body.mk-legacy article h3 { font-size: 1.25rem; }
/* Radii: one curve. Tailwind's own rules are the same specificity as these
   selectors alone, so the body prefix is what makes ours win. */
body.mk-legacy .rounded, body.mk-legacy .rounded-md, body.mk-legacy .rounded-sm { border-radius: 0 0 var(--r-xs) 0; }
body.mk-legacy .rounded-lg, body.mk-legacy .rounded-xl { border-radius: 0 0 var(--r-sm) 0; }
body.mk-legacy .rounded-2xl, body.mk-legacy .rounded-3xl { border-radius: 0 0 var(--r-md) 0; }
body.mk-legacy .rounded-full { border-radius: 0 0 var(--r-xs) 0; }
body.mk-legacy img.rounded-full, body.mk-legacy .avatar { border-radius: 50%; }
/* Colour worlds: deep teal bands, cream body, vermilion accent. */
body.mk-legacy .bg-brand-700, body.mk-legacy .bg-brand-800, body.mk-legacy .bg-brand-700\/95 { background-color: var(--deep); }
body.mk-legacy .bg-brand-600, body.mk-legacy .bg-brand-500 { background-color: var(--hot); }
body.mk-legacy .bg-brand-50, body.mk-legacy .bg-brand-100 { background-color: #FBE9E5; }
body.mk-legacy .text-brand-700, body.mk-legacy .text-brand-600 { color: var(--deep); }
body.mk-legacy .text-brand-500, body.mk-legacy .text-brand-400, body.mk-legacy .text-brand-300 { color: var(--hot); }
body.mk-legacy .border-brand-500, body.mk-legacy .border-brand-200 { border-color: var(--hot); }
body.mk-legacy .bg-ochre-400, body.mk-legacy .bg-ochre-100 { background-color: var(--butter); }
body.mk-legacy .text-ochre-400, body.mk-legacy .text-ochre-500, body.mk-legacy .text-ochre-600 { color: var(--hot-d); }
body.mk-legacy .bg-blue-50 { background-color: var(--bg); }
body.mk-legacy .bg-blue-400, body.mk-legacy .bg-blue-500 { background-color: var(--deep2); }
body.mk-legacy .text-blue-400, body.mk-legacy .text-blue-600 { color: var(--deep); }
body.mk-legacy .bg-paper-50, body.mk-legacy .bg-white { background-color: var(--paper); }
body.mk-legacy .bg-paper-100 { background-color: var(--bg); }
body.mk-legacy .bg-paper-200 { background-color: var(--line); }
body.mk-legacy .border-paper-100, body.mk-legacy .border-paper-200, body.mk-legacy .border-paper-300 { border-color: var(--line); }
body.mk-legacy .text-paper-700, body.mk-legacy .text-paper-800 { color: var(--ink); }
body.mk-legacy .text-paper-500, body.mk-legacy .text-paper-600 { color: var(--soft); }
body.mk-legacy .text-paper-300, body.mk-legacy .text-paper-400 { color: var(--mute); }
body.mk-legacy .shadow-lg, body.mk-legacy .shadow-md, body.mk-legacy .shadow-sm { box-shadow: none; }
body.mk-legacy :focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }

/* Guides (2026-10-06): the components the posts draw in their own <style>
   blocks take the brand's three moves. Specificity beats the inline rules. */
body.mk-legacy .pbox, body.mk-legacy .callout, body.mk-legacy .eflow-stage, body.mk-legacy .gsx-ph,
body.mk-legacy .gsx-module, body.mk-legacy .post-card, body.mk-legacy .p101-item, body.mk-legacy .shot img,
body.mk-legacy .gsx-table, body.mk-legacy table.cheat, body.mk-legacy .ord-cell, body.mk-legacy .anat li,
body.mk-legacy .gsc-card, body.mk-legacy .timeline-content { border-radius: 0 0 var(--r-xs) 0; }
body.mk-legacy .timeline-dot, body.mk-legacy .p101-n, body.mk-legacy .anat li::before, body.mk-legacy .how .n { border-radius: 0 0 6px 0; }
body.mk-legacy .pbox, body.mk-legacy .shot img, body.mk-legacy .gsx-ph { box-shadow: 6px 6px 0 var(--ink); }
body.mk-legacy .pbox { background: var(--paper); border-color: var(--line); }
body.mk-legacy .callout { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--hot); }
body.mk-legacy .timeline-dot, body.mk-legacy .p101-n { background: var(--hot); color: #FFFCF5; }
body.mk-legacy .gsx-kicker, body.mk-legacy .eyebrow { color: var(--hot); }
body.mk-legacy .post-card:hover, body.mk-legacy .p101-item[open] { border-color: var(--hot); }
/* the end-of-post band: deep teal, a vermilion offset, the one vermilion button */
body.mk-legacy main .bg-brand-700.rounded-xl { box-shadow: 6px 6px 0 var(--hot); border-radius: 0 0 var(--r-sm) 0; }
body.mk-legacy main .bg-brand-700 a.bg-white { background: var(--hot); color: #FFFCF5; }
body.mk-legacy main .bg-brand-700 a.bg-white:hover { background: var(--hot-d); }
body.mk-legacy .pull-quote { border-top: 2px solid var(--hot); border-bottom: 2px solid var(--line); }
body.mk-legacy .prose a:hover, body.mk-legacy article a:hover { color: var(--hot); }
/* Platform 101 (2026-10-09). Bordered blocks sit beside the floated fact card
   instead of running under it: a block that forms its own formatting context
   is placed next to a float, like a line of text, not behind it. */
body.mk-legacy .prose .callout, body.mk-legacy .prose .eflow, body.mk-legacy .prose .pull-quote, body.mk-legacy .prose .shot,
body.mk-legacy .prose .gsx-fig, body.mk-legacy .prose .mis, body.mk-legacy .prose .cheat, body.mk-legacy .prose .gsx-table-wrap { display: flow-root; }
/* The "where it sits" drawing (bin/guide-systems.py) inside the mechanism box */
body.mk-legacy .sysfig svg { display: block; width: 100%; max-width: 680px; height: auto; margin: 0 auto; }
body.mk-legacy .sysfig + .eflow-note, body.mk-legacy .sysfig + .eflow-eg { margin-top: 1.1rem; }
/* The cheat sheet: the one card worth keeping, so it gets the ink border and the shadow */
body.mk-legacy .cheat { margin: 2.75rem 0; padding: 1.25rem 1.4rem 1.4rem; border: 1px solid var(--ink); border-radius: 0 0 16px 0; background: var(--paper); box-shadow: 6px 6px 0 var(--ink); }
body.mk-legacy .cheat .cheat-k { margin: 0 0 0.3rem; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--hot); }
body.mk-legacy .cheat h2 { margin: 0; }
body.mk-legacy .cheat > p:not(.cheat-k) { margin: 0.5rem 0 0; }
body.mk-legacy .cheat table { margin: 1rem 0 0; font-size: 0.9rem; border: 0; }
body.mk-legacy .cheat th { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.6rem 0.875rem; }
body.mk-legacy .cheat td { border-left: 0; border-right: 0; border-color: var(--line); padding: 0.7rem 0.875rem; }
body.mk-legacy .cheat td:first-child { font-weight: 700; color: var(--ink); }
body.mk-legacy .cheat tr:nth-child(odd) td { background: var(--paper); }
body.mk-legacy .cheat tr:nth-child(even) td { background: var(--bg); }
body.mk-legacy .cheat code { background: var(--bg); }

/* The shared chrome on a legacy page */
body.mk-legacy .mk-nav { background: var(--bg); position: sticky; top: 0; z-index: 40; }
body.mk-legacy .mk-nav .wrap { height: 72px; }
