/* Public marketing pages (the guest homepage at /: templates/home_marketing.html).
   Loaded only on those pages, so the dashboard, Create, Edit and the rest of
   the app are untouched. Colors are tokens; headlines use Inter. */
:root {
  --mk-purple: #4F46E5;      /* buttons, links, highlights */
  --mk-purple-dark: #4338CA;
  --mk-purple-soft: #EEF2FF;
  --mk-bg: #F7F6FF;          /* light sections: a very light lavender */
  --mk-bg-alt: #EFEDFC;      /* every other story band */
  --mk-ink: #16133A;         /* text, headlines, the dark analytics band */
  --mk-yellow: #FBBF24;      /* accent, sparingly: underlines, badges */
  --mk-live: #22C55E;        /* live dots, scan counts on dark */
  --mk-muted: #4B4A63;
  --mk-line: #E4E1F5;
  --mk-card: #FFFFFF;
  --mk-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mk-gutter: 20px;
}
body { background: var(--mk-bg); }

.mk { font-family: var(--mk-font); color: var(--mk-ink); font-size: 17px; line-height: 1.55; }
.mk *, .mk *::before, .mk *::after { box-sizing: border-box; }
.mk h1, .mk h2, .mk h3 { font-family: var(--mk-font); color: inherit; margin: 0; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.mk p { margin: 0; }
.mk ul { margin: 0; padding: 0; list-style: none; }
.mk img { display: block; max-width: 100%; height: auto; }
.mk a { color: var(--mk-purple); }
.mk :focus-visible { outline: 3px solid var(--mk-purple); outline-offset: 3px; border-radius: 6px; }
.mk-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--mk-gutter); }
.mk-h2 { font-size: clamp(32px, 8vw, 54px); }
.mk-sub { font-size: 18px; color: var(--mk-muted); margin-top: 10px; max-width: 46ch; }

/* The primary call to action (hero and final). */
.mk .mk-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 14px; background: var(--mk-purple); color: #fff; font-weight: 800; font-size: 18px; text-decoration: none; box-shadow: 0 12px 26px -12px rgba(79,70,229,.8); transition: background .15s ease, transform .15s ease; }
.mk .mk-cta:hover { background: var(--mk-purple-dark); transform: translateY(-1px); color: #fff; }
.mk-cta svg { width: 20px; height: 20px; flex: none; }
.mk-note { font-size: 16px; color: var(--mk-muted); margin-top: 12px !important; }
.mk .mk-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 17px; text-decoration: underline; text-decoration-color: var(--mk-yellow); text-decoration-thickness: 3px; text-underline-offset: 6px; color: var(--mk-ink); }

/* Live dot */
.mk-live { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--mk-live); box-shadow: 0 0 0 4px rgba(34,197,94,.22); flex: none; animation: mk-blink 1.8s ease-in-out infinite; }
@keyframes mk-blink { 50% { box-shadow: 0 0 0 7px rgba(34,197,94,.08); } }
.mk-num { font-variant-numeric: tabular-nums; }

/* Hero */
.mk-hero { padding: 20px 0 48px; overflow: hidden; }
.mk-hero-in { display: grid; gap: 28px; align-items: center; }
.mk-hero-in > * { min-width: 0; }
.mk-hero #mk-h1 { font-size: clamp(34px, 9.8vw, 84px); line-height: .98; }
.mk-hero #mk-h1 span { display: block; color: var(--mk-purple); }
.mk-hero #mk-h1 em { font-style: normal; background: linear-gradient(transparent 78%, var(--mk-yellow) 78%, var(--mk-yellow) 92%, transparent 92%); }
.mk-lead { font-size: 18px; color: var(--mk-muted); margin: 16px 0 22px !important; max-width: 40ch; }

/* Your own page: the first screen (templates/home_marketing.html .mk-own).
   Phones: the words, then the three examples in a row you swipe (about
   1.2 showing, the phone beside its caption and button), Start free, then
   the Pet Tags line (computers: under the phones).
   Computers: the words and buttons on the left, three phones on the right. */
.mk-own { padding: 16px 0 28px; overflow: hidden; }
.mk-own-in { display: grid; gap: 18px; grid-template-areas: "copy" "row" "ctas" "pets"; }
.mk-own-in > * { min-width: 0; }
.mk-own-copy { grid-area: copy; }
.mk-own h1 { font-size: clamp(30px, 8.2vw, 40px); line-height: 1.06; text-wrap: balance; }
.mk-own h1 span { display: block; color: var(--mk-purple); }
.mk-own-sub { font-size: 17px; line-height: 1.5; color: var(--mk-muted); margin-top: 10px !important; max-width: 44ch; text-wrap: pretty; }
.mk-own-row { grid-area: row; display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--mk-gutter)) !important; padding: 4px var(--mk-gutter) 8px !important; scroll-padding: 0 var(--mk-gutter); }
.mk-own-row::-webkit-scrollbar { display: none; }
.mk-own-row:focus-visible { outline: 3px solid var(--mk-purple); outline-offset: -3px; }
.mk-own-ex { flex: 0 0 min(296px, 84%); scroll-snap-align: start; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--mk-card); border: 1px solid var(--mk-line); box-shadow: 0 14px 28px -22px rgba(22,19,58,.45); }
.mk .mk-own-phone { width: 108px; padding: 6px; border-radius: 24px; box-shadow: 0 10px 20px -12px rgba(17,24,39,.4); }
.mk-own-phone .aq-phone-screen { border-radius: 18px; }
.mk-own-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.mk-own-plan { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; font-size: 16px; font-weight: 800; line-height: 1.4; }
.mk-own-plan-free { background: #ECFDF5; color: #065F46; }
.mk-own-plan-starter, .mk-own-plan-pro { background: var(--mk-purple-soft); color: #3730A3; }
.mk-own-cap { font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; color: var(--mk-ink); }
.mk-own-meta form { margin: 4px 0 0; }
.mk-own-meta > a.mk-own-use { margin-top: 4px; }
.mk .mk-own-use { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--mk-purple); background: var(--mk-card); color: var(--mk-purple); font: 800 16px/1.2 var(--mk-font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.mk .mk-own-use:hover { background: var(--mk-purple); color: #fff; }
@media (max-width: 639px) { .mk .mk-own-use { padding: 0 10px; } .mk-own-ex { padding: 10px; } }
.mk-own-pets { grid-area: pets; display: flex; flex-wrap: wrap; align-items: center; column-gap: .3em; margin: -8px 0 -10px !important; font-size: 16px; line-height: 1.4; color: var(--mk-muted); }
.mk-own-pets span, .mk-own-pets a { white-space: nowrap; }
.mk-own-pets a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mk-purple); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.mk-own-ctas { grid-area: ctas; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; }
.mk .mk-own-start { min-height: 52px; }
/* Tablets and computers: the three examples side by side, each phone the
   shared mockup at full size (10px frame, 200px wide). */
@media (min-width: 640px) {
  .mk-own-row { overflow: visible; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 222px)); justify-content: start; gap: 16px; }
  .mk-own-ex { flex-direction: column; text-align: center; padding: 16px 10px; gap: 12px; }
  .mk-own-meta { align-items: center; }
  .mk .mk-own-use { padding: 0 12px; }
  .mk .mk-own-phone { width: min(200px, 100%); padding: 10px; border-radius: 40px; }
  .mk-own-phone .aq-phone-screen { border-radius: 30px; }
}
/* Computers: words and buttons on the left, the three phones on the right. */
@media (min-width: 1200px) {
  .mk-own { padding: 32px 0 40px; }
  .mk-own-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy row" "ctas row" ". pets"; column-gap: 40px; row-gap: 26px; align-items: end; }
  .mk-own-ctas { align-self: start; }
  .mk-own h1 { font-size: clamp(38px, 3.1vw, 46px); line-height: 1.04; }
  .mk-own-sub { font-size: 20px; margin-top: 16px !important; }
}

/* Phones: the shared phone mockup (static/css/phone.css, .aq-phone), the
   same shape as on /link-in-bio. Only the width is set here. */
.mk-phone { width: min(300px, 76vw); }
.mk-cyc > [data-cyc-item] { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.mk-cyc > [data-cyc-item].is-on { opacity: 1; }

.mk-stage { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; }
.mk-stage-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.mk-hero-phone { width: min(250px, 58vw); }
/* Beside the phone, never on it. */
.mk-badge { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px; row-gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--mk-card); box-shadow: 0 16px 32px -18px rgba(22,19,58,.45); border: 1px solid var(--mk-line); font-size: 16px; color: var(--mk-muted); }
.mk-badge .mk-num { font-size: 32px; font-weight: 900; color: var(--mk-ink); line-height: 1; min-width: 2ch; }
.mk-badge span:last-child { grid-column: 1 / -1; white-space: nowrap; }
.mk-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mk .mk-tab { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--mk-line); background: var(--mk-card); color: var(--mk-ink); font: 700 16px/1 var(--mk-font); cursor: pointer; white-space: nowrap; }
.mk .mk-tab[aria-pressed="true"] { background: var(--mk-ink); border-color: var(--mk-ink); color: #fff; }
/* The hero's five tabs on one row. */
.mk-stage .mk-tabs { gap: 4px; max-width: 100%; }
.mk .mk-stage .mk-tab { padding: 0 12px; }
@media (max-width: 480px) {
  .mk-stage .mk-tabs { flex-wrap: nowrap; gap: 4px; }
  /* The one place under 16px: five tabs only fit one row at 390 at 13px. */
  .mk .mk-stage .mk-tab { padding: 0 7px; border-width: 1.5px; font-size: 13px; }
}
@media (max-width: 369px) { .mk-stage .mk-tabs { flex-wrap: wrap; } }

/* Stories */
.mk-stories { padding: 40px 0 0; }
.mk-story { padding: 48px 0; border-top: 1px solid var(--mk-line); }
.mk-stories > .mk-wrap { margin-bottom: 24px; }
.mk-story-alt { background: var(--mk-bg-alt); }
.mk-story-in { display: grid; gap: 28px; align-items: center; }
.mk-story-in > * { min-width: 0; }
.mk-eyebrow { display: inline-block; font-weight: 800; font-size: 16px; color: var(--mk-ink); background: var(--mk-yellow); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px !important; }
.mk-story h3 { font-size: clamp(28px, 7vw, 42px); margin-bottom: 14px; }
.mk-story-copy > p:not(.mk-eyebrow) { font-size: 18px; color: var(--mk-muted); max-width: 52ch; }
.mk-story-art { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.mk-alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--mk-card); border: 1px solid var(--mk-line); box-shadow: 0 14px 28px -18px rgba(22,19,58,.45); font-size: 16px; opacity: .35; transition: opacity .5s ease; }
.mk-alert.is-on { opacity: 1; }
.mk-alert b { display: block; color: var(--mk-ink); }
.mk-alert span:last-child { color: var(--mk-muted); }
.mk-count { margin-top: 16px !important; font-size: 18px; }
.mk-count .mk-num { font-size: 34px; font-weight: 900; color: var(--mk-purple); display: inline-block; min-width: 4.2ch; }
.mk-demo { font-size: 16px; color: var(--mk-muted); }
.mk-handle { font-weight: 900; font-size: clamp(22px, 6vw, 28px); letter-spacing: -.02em; background: var(--mk-card); border: 2px solid var(--mk-ink); border-radius: 14px; padding: 8px 16px; }
.mk-handle b { color: var(--mk-purple); }

/* Analytics band */
.mk-stats { background: var(--mk-ink); color: #fff; padding: 56px 0 48px; }
.mk-stats-in { display: grid; gap: 28px; align-items: center; }
.mk-stats-in > * { min-width: 0; }
.mk-stats-copy p { color: #C7D2FE; font-size: 18px; margin-top: 12px; max-width: 42ch; }
.mk-dash { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 22px; padding: 20px; }
.mk-dash-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mk-dash-title { font-size: 18px; font-weight: 800; }
.mk-dash-title span { display: block; font-weight: 500; color: #A5B4FC; font-size: 16px; }
.mk-dash-live { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; color: #C7D2FE; }
.mk-total { margin-top: 8px !important; }
.mk-total { line-height: 1.2; }
/* Tall line box so the comma's tail never reaches the label; tabular figures
   and a fixed minimum width so a ticking count never moves anything. */
.mk-total .mk-num { font-weight: 900; font-size: clamp(52px, 15vw, 88px); letter-spacing: -.04em; line-height: 1.2; color: var(--mk-live); display: inline-block; min-width: 6.2ch; }
.mk-total-l { color: #C7D2FE; font-size: 16px; margin-top: .35em !important; margin-bottom: 12px !important; }
.mk-chart svg { display: block; width: 100%; height: auto; }
.mk-dash-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.mk-k { font-size: 16px; color: #A5B4FC; }
.mk-v { font-size: 18px; font-weight: 800; }
.mk-bars { margin-top: 8px; }
.mk-bars rect { transition: height .5s ease, y .5s ease; }
.mk-facts { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 36px !important; border-top: 1px solid rgba(255,255,255,.14); }
.mk-facts li { padding: 20px 8px; font-size: 16px; color: #C7D2FE; border-bottom: 1px solid rgba(255,255,255,.14); }
.mk-facts b { display: block; font-size: 44px; font-weight: 900; letter-spacing: -.04em; color: #fff; line-height: 1.05; }

/* The generator's own section heading (the generator itself is today's). */
.mk-gen { padding: 56px 0 8px; }

/* "There’s A QR code for that.": every type, 2 across on phones, 5 on computers. */
.mk-types { padding: 56px 0 48px; border-top: 1px solid var(--mk-line); }
.mk-types .mk-h2 span { color: var(--mk-purple); }
.mk-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px !important; }
.mk-type-grid > li { min-width: 0; }
.mk a.mk-type { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 44px; padding: 16px; border-radius: 16px; background: var(--mk-card); border: 1px solid var(--mk-line); color: var(--mk-ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.mk a.mk-type:hover { border-color: var(--mk-purple); transform: translateY(-2px); }
.mk-type img { width: 28px; height: 28px; }
.mk a.mk-type { position: relative; }
/* The name on one line; a Paid tag sits in the card's top right corner,
   beside the icon, so it never pushes the name onto a second line. */
.mk-type-n { display: block; white-space: nowrap; font-weight: 800; font-size: 18px; letter-spacing: -.01em; line-height: 1.25; }
.mk-type-n .mk-paid { position: absolute; top: 14px; right: 14px; }
@media (max-width: 400px) { .mk-type-n { font-size: 16.5px; } }
.mk-type-d { font-size: 16px; color: var(--mk-muted); line-height: 1.4; }
.mk-keep { white-space: nowrap; }
.mk-paid { display: inline-block; font-size: 16px; font-weight: 800; line-height: 1.2; letter-spacing: .01em; color: var(--mk-purple-dark); background: var(--mk-purple-soft); border-radius: 999px; padding: 1px 9px; }

/* Sideways rows on phones ("Make it yours", "Where people use them"): each
   row scrolls on its own, snapping card by card, with the next card peeking
   in at the edge; never the page. Computers: a grid. */
.mk-row { display: grid; grid-auto-flow: column; gap: 12px; margin: 24px calc(-1 * var(--mk-gutter)) 0 !important; padding: 4px var(--mk-gutter) 14px !important; scroll-padding: 0 var(--mk-gutter); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.mk-row > li { scroll-snap-align: start; min-width: 0; }
.mk-row:focus-visible { outline-offset: -3px; }

/* "Make it yours": one code, ten looks. */
.mk-styles { padding: 48px 0 40px; background: var(--mk-bg-alt); }
/* Same size and spacing as the other subtitles; the link sits in the line
   (no tall inline box), so every line is the same height. */
.mk-sub.mk-styles-line { max-width: 40ch; text-wrap: pretty; }
.mk .mk-styles-line .mk-more { display: inline; min-height: 0; padding: 12px 0; font-size: inherit; white-space: nowrap; }
@media (min-width: 900px) { .mk-sub.mk-styles-line { max-width: none; } }
.mk-style-row { grid-auto-columns: 40%; align-items: start; }
.mk-style { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 18px; padding: 14px; }
.mk-style img { width: 100%; max-width: 150px; }
.mk-style p { font-weight: 700; font-size: 16px; text-align: center; line-height: 1.3; }

/* "Where people use them": a code on the thing it's printed on. */
.mk-uses { padding: 48px 0 56px; }
.mk-use-row { grid-auto-columns: 72%; }
.mk a.mk-use { display: flex; flex-direction: column; gap: 4px; height: 100%; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 18px; padding: 12px 12px 16px; color: var(--mk-ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.mk a.mk-use:hover { border-color: var(--mk-purple); transform: translateY(-2px); }
.mk-scene { display: block; border-radius: 12px; margin-bottom: 8px; background: var(--mk-bg); }
.mk-scene svg { display: block; width: 100%; height: auto; font-family: var(--mk-font); }
.mk-scene-tent { background: #FDF2E9; } .mk-scene-card { background: var(--mk-purple-soft); } .mk-scene-wifi { background: #E0F2F1; }
.mk-scene-pet { background: #ECFDF5; } .mk-scene-flyer { background: #FCE7F3; } .mk-scene-box { background: #F5F5F4; }
.mk-use-t { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.mk-use-d { font-size: 16px; color: var(--mk-muted); line-height: 1.4; }

/* Internal links */
.mk-links { padding: 40px 0; border-top: 1px solid var(--mk-line); }
.mk-links-h { font-size: 22px !important; letter-spacing: -.01em !important; margin-bottom: 14px !important; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.mk .mk-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--mk-card); border: 1px solid var(--mk-line); color: var(--mk-purple); font-weight: 700; font-size: 16px; text-decoration: none; }
.mk .mk-chips a:hover { border-color: var(--mk-purple); }

/* Plans */
.mk-plans { padding: 56px 0; }
.mk-plan-grid { display: grid; gap: 16px; margin-top: 24px; grid-template-columns: minmax(0, 1fr); }
.mk-plan { position: relative; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 18px; padding: 24px; }
/* "Best Value", as on the pricing page: a tab hanging from the card's top edge. */
.mk-ribbon { position: absolute; top: -1px; right: 20px; background: var(--mk-purple); color: #fff; font-size: 16px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; padding: 6px 14px 7px; border-radius: 0 0 12px 12px; }
.mk-plan h3 { font-size: 22px; letter-spacing: -.01em; }
.mk-price { font-size: 48px; font-weight: 900; letter-spacing: -.04em; margin: 8px 0 0 !important; line-height: 1.1; }
.mk-per, .mk-intro { font-size: 16px; color: var(--mk-muted); }
.mk-intro { margin-top: 12px !important; }
.mk-plan ul { margin-top: 14px; display: grid; gap: 8px; }
.mk-plan li { position: relative; padding-left: 28px; font-size: 16px; }
.mk-plan li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--mk-purple-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.mk-plan-pro { background: var(--mk-ink); color: #fff; border-color: var(--mk-ink); }
.mk-plan-pro .mk-per, .mk-plan-pro .mk-intro { color: #C7D2FE; }
.mk-plans-more { margin-top: 16px !important; }

/* Final call to action */
.mk-final { padding: 56px 0 72px; text-align: center; border-top: 1px solid var(--mk-line); }
.mk-final .mk-h2 { margin-bottom: 22px; }

@media (min-width: 760px) {
  .mk-type-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  .mk-row { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin: 24px 0 0 !important; padding: 0 !important; }
  .mk-style-row { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; }
  .mk-use-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .mk-plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-facts { grid-template-columns: repeat(4, 1fr); }
  .mk-facts li { border-bottom: 0; border-right: 1px solid rgba(255,255,255,.14); padding: 24px 20px; }
  .mk-facts li:last-child { border-right: 0; }
}
@media (min-width: 960px) {
  .mk-hero { padding: 48px 0 72px; }
  .mk-hero-in { grid-template-columns: 1.1fr .9fr; gap: 40px; }
  .mk-hero #mk-h1 { font-size: clamp(52px, 4.6vw, 68px); }
  .mk-lead { font-size: 20px; }
  .mk-hero-phone { width: 310px; }

  .mk-story { padding: 64px 0; }
  .mk-story-in { grid-template-columns: 1fr 1fr; gap: 64px; }
  .mk-story-alt .mk-story-copy { order: 2; }
  .mk-stats { padding: 80px 0 64px; }
  .mk-stats-in { grid-template-columns: .9fr 1.1fr; gap: 64px; }
}

/* The faint QR-style pattern (static/img/qr-pattern.svg, scripts/build_qr_pattern.py)
   behind the light sections: a few percent strong, stronger at the edges and
   faded out behind the text and phones by a mask. Static, never moves. */
.mk-own, .mk-hero, .mk-story, .mk-gen, .mk-links, .mk-plans, .mk-final { position: relative; isolation: isolate; }
.mk-own::before, .mk-hero::before, .mk-story::before, .mk-gen::before, .mk-links::before, .mk-plans::before, .mk-final::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/qr-pattern.svg") 0 0 / 320px 320px repeat;
  opacity: var(--mk-pattern, .03);
  -webkit-mask-image: var(--mk-mask); mask-image: var(--mk-mask);
}
.mk-hero { --mk-pattern: .05;
  /* Phones: only the outer edges, nothing behind the text or the phone. */
  --mk-mask: linear-gradient(90deg, #000 0, transparent 14%, transparent 86%, #000 100%); }
.mk-own, .mk-story, .mk-gen, .mk-links, .mk-plans, .mk-final {
  --mk-mask: linear-gradient(90deg, #000 0, transparent 12%, transparent 88%, #000 100%); }
@media (min-width: 960px) {
  .mk-hero { --mk-mask: radial-gradient(ellipse 62% 66% at 50% 50%, transparent 55%, #000 100%); }
  .mk-own, .mk-story, .mk-gen, .mk-links, .mk-plans, .mk-final { --mk-mask: radial-gradient(ellipse 60% 70% at 50% 50%, transparent 60%, #000 100%); }
}

/* Reduce motion: everything holds still in its final state. */
@media (prefers-reduced-motion: reduce) {
  .mk *, .mk *::before, .mk *::after { animation: none !important; transition: none !important; }
}
html.mk-still .mk *, html.mk-still .mk *::before, html.mk-still .mk *::after { animation: none !important; transition: none !important; }
/* Lands just under the site's fixed header. */
#generator { scroll-margin-top: calc(var(--header-h, 68px) + 8px); }
.mk-gen h2:focus:not(:focus-visible) { outline: none; }

/* ── About page (templates/about.html) ─────────────────────────────────── */
/* The site header is fixed and 1px taller than the space the body reserves
   for it, so the hero keeps its own clear space above the h1, and an
   in-page jump lands below the header too. */
.ab h1, .ab h2 { scroll-margin-top: calc(var(--header-h, 68px) + 16px); }
.ab-hero { position: relative; isolation: isolate; padding: 40px 0 48px; }
.ab-hero-in { display: grid; gap: 28px; align-items: start; }
.ab-hero-in > * { min-width: 0; }
.ab-hero h1 { font-size: clamp(34px, 9vw, 60px); line-height: 1.04; overflow-wrap: break-word; text-wrap: balance; }
.ab-hero h1 em { font-style: normal; white-space: nowrap; color: var(--mk-purple); background: linear-gradient(transparent 80%, var(--mk-yellow) 80%, var(--mk-yellow) 94%, transparent 94%); }
.ab-story { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 22px; padding: 24px 20px; box-shadow: 0 24px 48px -32px rgba(22,19,58,.35); }
.ab-story > p { font-size: 18px; line-height: 1.65; color: var(--mk-ink); }
.ab-story > p + p { margin-top: 16px !important; }
.ab-sign { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--mk-line); }
.ab-sig { display: block; font-family: "Sacramento", cursive; font-size: 46px; line-height: 1; color: var(--mk-purple); }
.ab-signoff { font-size: 16px; color: var(--mk-muted); margin-top: 6px !important; }
.ab-signoff b { color: var(--mk-ink); }
.ab-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ab-sec { background: var(--mk-ink); color: #fff; padding: 56px 0; }
.ab-sec-grid { display: grid; gap: 16px; margin-top: 28px !important; }
.ab-sec-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 22px; }
.ab-ico { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--mk-yellow); color: var(--mk-ink); display: block; }
.ab-sec-card h3 { font-size: 22px; letter-spacing: -.01em; line-height: 1.2; margin-top: 14px; }
.ab-sec-card p { color: #C7D2FE; font-size: 17px; margin-top: 8px !important; }

.ab-a, .ab-ex { position: relative; isolation: isolate; padding: 56px 0 8px; }
.ab-a .ab-a-sub { max-width: none; } /* one line on computers */
.ab-h2-sm { font-size: clamp(28px, 6vw, 36px) !important; }
.ab-a-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px !important; }
.ab-a-row li { background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 16px; padding: 16px; }
.ab-a-row li:last-child { grid-column: 1 / -1; }
.ab-a-letter { display: block; font-size: 44px; font-weight: 900; line-height: 1; color: var(--mk-purple); letter-spacing: -.04em; }
.ab-a-row h3 { font-size: 18px; letter-spacing: -.01em; line-height: 1.2; margin-top: 8px; }
.ab-a-row p { font-size: 16px; color: var(--mk-muted); margin-top: 4px !important; line-height: 1.45; }

.ab-ex { padding-bottom: 56px; }
.ab-ex-grid { display: grid; gap: 16px; margin-top: 24px !important; }
.mk a.ab-ex-card { display: flex; align-items: stretch; height: 100%; background: var(--mk-card); border: 1px solid var(--mk-line); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--mk-ink); transition: border-color .15s ease, transform .15s ease; }
.mk a.ab-ex-card:hover { border-color: var(--mk-purple); transform: translateY(-2px); }
.ab-ex-shot { flex: 0 0 120px; background: var(--mk-bg-alt); padding: 14px 14px 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.ab-ex-shot img { width: 100%; height: 150px !important; object-fit: cover; object-position: top; border: 5px solid #0B0B12; border-bottom: 0; border-radius: 18px 18px 0 0; }
.ab-ex-body { display: flex; flex-direction: column; justify-content: center; padding: 16px; min-width: 0; }
.ab-ex-t { font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.ab-ex-c { font-size: 16px; color: var(--mk-muted); margin-top: 4px; line-height: 1.45; }

.ab-hero::before, .ab-a::before, .ab-ex::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/qr-pattern.svg") 0 0 / 320px 320px repeat; opacity: .04;
  -webkit-mask-image: linear-gradient(90deg, #000 0, transparent 12%, transparent 88%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0, transparent 12%, transparent 88%, #000 100%);
}

@media (min-width: 760px) {
  .ab-sec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ab-a-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ab-a-row li:last-child { grid-column: auto; }
  .ab-ex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk a.ab-ex-card { flex-direction: column; }
  .ab-ex-shot { flex: none; padding: 20px 20px 0; }
  .ab-ex-shot img { width: 64%; height: 190px !important; }
}
@media (min-width: 960px) {
  .ab-hero { padding: 72px 0 80px; }
  .ab-hero-in { grid-template-columns: 5fr 7fr; gap: 56px; }
  .ab-hero-copy { position: sticky; top: calc(var(--header-h, 68px) + 32px); }
  .ab-hero h1 { font-size: clamp(48px, 4.4vw, 62px); }
  .ab-story { padding: 36px 40px; }
  .ab-sec { padding: 80px 0; }
  .ab-a, .ab-ex { padding-top: 72px; }
  .ab-ex { padding-bottom: 72px; }
  .ab-hero::before, .ab-a::before, .ab-ex::before {
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, transparent 60%, #000 100%);
    mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, transparent 60%, #000 100%); }
}

/* The founder: the About page photo and the homepage "Who’s behind AQRHub" strip. */
.ab-photo { margin: 24px 0 0; }
.ab-photo img { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: 0 24px 48px -28px rgba(22,19,58,.45); background: var(--mk-line); }
.ab-photo figcaption { margin-top: 10px; font-size: 16px; color: var(--mk-muted); text-align: center; }
.ab-paris { white-space: nowrap; }
.ab-paris { color: var(--mk-purple); font-weight: 600; }
.ab-wing { display: inline-block; width: 1em; height: 1em; vertical-align: -.08em; fill: currentColor; }
.ab-wing-l { transform: scaleX(-1); }
.mk-founder { padding: 8px 0 32px; }
.mk-founder-card { display: flex; align-items: center; gap: 18px; max-width: 720px; margin: 0 auto; padding: 18px 20px; background: var(--mk-card);
                   border: 1px solid var(--mk-line); border-radius: 22px; box-shadow: 0 18px 36px -26px rgba(22,19,58,.4); }
.mk-founder-img { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 4px #EEF2FF; }
.mk-founder-text { min-width: 0; }
.mk-founder-h { font-size: 20px; line-height: 1.25; margin: 0 0 4px; color: var(--mk-ink); }
.mk-founder-text p { margin: 0 0 6px; font-size: 16px; line-height: 1.5; color: var(--mk-muted); text-wrap: pretty; }
.mk-founder .mk-more { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 420px) {
  .mk-founder-card { flex-direction: column; text-align: center; gap: 12px; }
  .mk-founder-text p { text-wrap: balance; }
}
@media (min-width: 960px) { .mk-founder-card { padding: 22px 28px; gap: 24px; } .mk-founder-img { width: 112px; height: 112px; } .mk-founder-h { font-size: 22px; } }
