/* Marketing pages (free tools). Sam's look (apps/shell/src/sam.css tokens) in plain CSS, no web
   fonts: system fonts keep these pages fast, which matters for search ranking. */
:root {
  --brand: #d9694b; --brand-strong: #b9452a; --brand-soft: #fbe9e2;
  --ink: #1c1a17; --ink-soft: #4f4a43; --ink-muted: #6f685f;
  --surface: #ffffff; --page: #fcf8f2; --line: #ebe4d9; --radius: 14px;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-strong); }
img { display: block; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0.4rem 0 0.8rem; }
h2 { font-size: 1.75rem; margin: 2.4rem 0 0.8rem; }

.m-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.m-narrow { max-width: 760px; }
main { padding: 24px 0 64px; }

.m-header { border-bottom: 1px solid var(--line); background: rgba(252, 248, 242, 0.92); position: sticky; top: 0; z-index: 10; }
.m-header .m-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.m-header nav { display: flex; align-items: center; gap: 18px; font-size: 0.95rem; }
.m-header nav a { color: var(--ink-soft); text-decoration: none; }
.m-header nav a:hover { color: var(--ink); }
.m-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.m-brand img { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; }
.m-btn, .m-header nav a.m-btn { display: inline-block; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; font: 600 0.95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.m-btn:hover, .m-header nav a.m-btn:hover { background: var(--brand-strong); color: #fff; }

.m-crumbs { font-size: 0.85rem; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 6px; }
.m-crumbs a { color: var(--ink-muted); }
.m-crumbs i { font-style: normal; color: var(--line); }
.m-eyebrow { margin: 20px 0 0; font: 500 0.72rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-strong); }
.m-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; margin: 0 0 24px; }

.t-tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.t-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.t-field, .t-input { min-width: 0; }
.t-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.t-field small { font-weight: 400; color: var(--ink-muted); font-size: 0.8rem; line-height: 1.4; }
.t-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--page); }
.t-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.t-input i { font-style: normal; color: var(--ink-muted); padding: 0 10px; }
.t-input input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 12px; font: 400 1rem var(--sans); color: var(--ink); outline: none; }
.t-input i + input { padding-left: 0; }
.t-results { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.t-result { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--page); }
.t-result span { font-size: 0.85rem; color: var(--ink-muted); }
.t-result strong { font-size: 1.3rem; }
.t-primary { background: var(--brand-soft); }
.t-primary strong { color: var(--brand-strong); font-size: 1.6rem; }
.t-copy { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.t-copy span { font-size: 0.85rem; color: var(--ink-muted); }
.t-copy code { display: block; padding: 12px; border-radius: 10px; background: var(--page); font: 0.9rem/1.5 var(--mono); overflow-wrap: anywhere; }
.t-copy p { margin: 0; display: flex; gap: 14px; align-items: center; font-size: 0.9rem; }
.t-note { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); }
.t-btn-quiet { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font: 500 0.85rem var(--sans); color: var(--ink); cursor: pointer; }
.t-btn-quiet:hover { border-color: var(--ink-muted); }
.t-share { margin: 14px 0 0; }

.m-cta { margin: 28px 0 0; padding: 22px; border-radius: var(--radius); background: var(--ink); color: #f4eee5; }
.m-cta h2 { margin: 0 0 6px; color: #fff; }
.m-cta p { margin: 0 0 16px; }
.m-cta .m-btn { background: var(--brand); }
.m-cta .m-btn:hover { background: #fff; color: var(--ink); }

.m-prose { color: var(--ink-soft); }
.m-prose strong { color: var(--ink); }
.m-formula { font-family: var(--mono); font-size: 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); overflow-wrap: anywhere; }
.m-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 0.95rem; }
.m-table th, .m-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.m-table th { color: var(--ink); }

.m-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.m-faq summary { cursor: pointer; font-weight: 600; }
.m-faq p { margin: 8px 0 0; color: var(--ink-soft); }

.m-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.m-cards-hub { margin-top: 12px; }
.m-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.m-card span { color: var(--ink-soft); font-size: 0.95rem; }
.m-card:hover { border-color: var(--brand); }

.m-footer { border-top: 1px solid var(--line); padding: 40px 0 24px; font-size: 0.92rem; color: var(--ink-soft); }
.m-footer .m-wrap { display: grid; grid-template-columns: 1.6fr 1.2fr 1fr 1fr; gap: 28px; }
.m-footer a:not(.m-brand) { display: block; color: var(--ink-soft); text-decoration: none; padding: 3px 0; }
.m-footer a:hover { color: var(--ink); }
.m-footer-title { font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.m-country a, .m-footer .m-country a { display: inline; }
.m-copy { text-align: center; color: var(--ink-muted); font-size: 0.8rem; margin: 28px 0 0; }

/* Selects, text areas and line items (invoice generator). */
.t-input select, .t-input textarea { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 12px; font: 400 1rem var(--sans); color: var(--ink); outline: none; }
.t-input textarea { resize: vertical; line-height: 1.45; }
.t-wide { grid-column: 1 / -1; }
.t-row { grid-column: 1 / -1; display: grid; grid-template-columns: 3fr 1fr 1.2fr; gap: 8px; }
.t-row .t-field { gap: 0; }
.t-row-head { font-weight: 600; font-size: 0.85rem; margin-bottom: -10px; }
.t-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.t-copy pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--page); font: 0.9rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.t-results > * { min-width: 0; }
.t-doc { grid-column: 1 / -1; overflow-x: auto; }
.m-scroll { overflow-x: auto; }
.t-doc > p { margin: 14px 0 0; }
.t-names { columns: 2; margin: 0; padding-left: 1.4em; font-weight: 600; }
.t-qr { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
.t-qr svg { width: 180px; height: 180px; }
.t-qr p { margin: 0; font-size: 1.1rem; }

/* Printable documents (d-*): invoice, quote, job sheet, timesheet. */
.d-doc { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 10px; padding: 28px; font-size: 0.92rem; line-height: 1.45; min-width: 520px; }
.d-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.d-title { font: 400 2rem/1 var(--serif); margin: 0 0 6px; }
.d-from { text-align: right; }
.d-muted { color: #666; margin: 0; }
.d-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #666; margin: 0 0 4px; }
.d-to { margin-bottom: 18px; }
.d-to p { margin: 0; }
.d-lines, .d-totals { width: 100%; border-collapse: collapse; }
.d-lines th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: #666; border-bottom: 2px solid #111; padding: 6px 4px; }
.d-lines td { border-bottom: 1px solid #e5e5e5; padding: 8px 4px; vertical-align: top; }
.d-ruled td { height: 34px; }
.d-num { text-align: right; white-space: nowrap; }
.d-totals { width: auto; margin: 12px 0 0 auto; min-width: 240px; }
.d-totals td { padding: 4px; }
.d-total td { font-weight: 700; border-top: 2px solid #111; font-size: 1.05rem; }
.d-notes { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid #e5e5e5; color: #333; }
.d-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.d-box { margin-bottom: 14px; }
.d-blank { border-bottom: 1px solid #999; height: 28px; }

/* Content pages. */
.m-dialogue { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 6px 16px; }
.m-dialogue p { color: var(--ink); }
.m-table caption { text-align: left; padding: 10px 14px; color: var(--ink-muted); font-size: 0.85rem; caption-side: top; }
.m-more { margin-top: 28px; }
.m-embed { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; background: var(--surface); }
.m-embed summary { cursor: pointer; font-weight: 600; }
.m-embed pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.82rem/1.5 var(--mono); background: var(--page); padding: 12px; border-radius: 10px; }
body.m-bare { background: transparent; }
.m-embed-frame { padding: 8px; }
.m-credit { text-align: right; font-size: 0.82rem; color: var(--ink-muted); margin: 8px 0 0; }
.m-credit a { color: var(--ink-muted); }

/* Print: only the document. */
/* The credit at the foot of every document (calc/documents.ts) */
.d-made { margin: 22px 0 0; padding-top: 10px; border-top: 1px solid #eee; font-size: 0.75rem; color: #888; text-align: center; }
.d-made a { color: #888; }

/* Printing a document: client.ts copies it into #print-area; only that prints, on clean A4 pages with no
   browser header or footer (margin 0) and the document's own margins. */
@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  html.printing body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; padding: 16mm 15mm; }
  #print-area .d-doc { border: 0; border-radius: 0; padding: 0; min-width: 0; font-size: 10.5pt; }
  #print-area .d-lines tr, #print-area .d-totals { break-inside: avoid; }
  html:not(.printing) body * { visibility: hidden; }
  html:not(.printing) .t-printable, html:not(.printing) .t-printable * { visibility: visible; }
  html:not(.printing) .t-printable { position: absolute; inset: 0 auto auto 0; width: 100%; }
}
#print-area { display: none; }

@media (max-width: 640px) {
  .m-header nav > a:not(.m-btn) { display: none; } /* phones: Product menu + Start free */
  .m-footer .m-wrap { grid-template-columns: 1fr; }
  .t-tool { padding: 16px; }
  .t-row { grid-template-columns: 2fr 1fr 1.2fr; }
  .t-names { columns: 1; }
  .d-grid2 { grid-template-columns: 1fr; }
}

/* Guides */
.m-byline { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 24px; }
.m-prose blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--brand); background: #fff; border-radius: 0 10px 10px 0; }
.m-prose blockquote p { margin: 0; }

.t-audio { width: 100%; margin: 8px 0 4px; }

/* Industry pages: hero actions and official links */
.m-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.m-btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.m-btn-ghost:hover { background: #fff; color: var(--ink); }
.m-official { font-size: 0.95rem; color: var(--ink-soft); }
.m-answer { font-size: 1.02rem; line-height: 1.6; color: var(--ink); background: #fff; border-left: 3px solid var(--brand); border-radius: 0 12px 12px 0; padding: 14px 16px; margin: -8px 0 24px; }
.m-save { margin: 20px 0 0; padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.m-save h2 { margin: 0 0 6px; font-size: 1.3rem; }
.m-save p { margin: 0 0 12px; color: var(--ink-soft); }
.m-save p:last-child { margin: 0; }
.m-alt { margin: 12px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.m-alt h3 { margin: 0 0 6px; }
.m-alt p { margin: 0 0 6px; color: var(--ink-soft); }
.m-alt p:last-child { margin: 0; }

/* UK AI jobs map (pages/research.ts) */
.aj-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 24px; }
.aj-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.aj-stats strong { display: block; font: 400 2.2rem/1.1 var(--serif); color: var(--brand-strong); }
.aj-stats span { color: var(--ink-soft); font-size: 0.92rem; }
.aj-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.aj-search { flex: 1 1 240px; }
.aj-search input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: var(--page); }
.aj-toggle[aria-pressed="true"] { background: var(--brand-strong); }
.aj-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-muted); margin-bottom: 10px; }
.aj-legend i { width: 140px; height: 10px; border-radius: 5px; }
.aj-key { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }
.aj-key b { width: 14px; height: 14px; border: 2.5px solid var(--ink); border-radius: 3px; }
.aj-frame { overflow-x: auto; }
.aj-map { width: 100%; min-width: 640px; height: auto; display: block; font: 600 11px var(--sans); }
.aj-group { fill: var(--ink); font: 700 12px var(--sans); }
.aj-tile { cursor: pointer; outline: none; }
.aj-tile text { fill: #1c1a17; pointer-events: none; }
.aj-tile rect { stroke: var(--surface); stroke-width: 1; transition: opacity .15s; }
.aj-tile.is-home rect { stroke: var(--ink); stroke-width: 2.5; }
.aj-tile.is-dim rect, .aj-tile.is-dim text { opacity: 0.15; }
.aj-tile.is-picked rect, .aj-tile:focus rect { stroke: var(--brand-strong); stroke-width: 3.5; }
.aj-detail { min-height: 96px; margin-top: 12px; padding: 12px 14px; background: var(--page); border-radius: 10px; font-size: 0.95rem; }
.aj-detail p { margin: 0 0 6px; }
.aj-detail dl { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 6px; }
.aj-detail dt { font-size: 0.75rem; color: var(--ink-muted); }
.aj-detail dd { margin: 0; font-weight: 600; }
.aj-badge { display: inline-block; font-size: 0.75rem; background: var(--brand-soft); color: var(--brand-strong); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.aj-table tr.is-home td { background: var(--brand-soft); }

/* Solution landing pages (pages/solutions.ts) */
.s-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 24px; padding-bottom: 16px; }
.s-context { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius); background: var(--brand-soft); color: var(--ink); font-size: 0.98rem; }
.s-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.s-btn-ghost, .m-cta .s-btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.m-cta .s-btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }
.s-hero-img { position: relative; margin: 0; }
.s-hero-img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }
.s-call { position: absolute; left: -16px; bottom: 20px; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(28,26,23,0.12); font-size: 0.88rem; }
.s-call span { color: var(--ink-muted); }
.s-section { padding: 8px 0 16px; }
.s-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.s-grid-3 { grid-template-columns: repeat(3, 1fr); }
.s-tile, .s-scene { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.s-tile h3, .s-scene h3 { margin: 0 0 6px; font-size: 1.05rem; }
.s-tile p, .s-scene p { margin: 0; color: var(--ink-soft); }
.s-scene { padding: 0; overflow: hidden; }
.s-scene img { width: 100%; height: auto; aspect-ratio: 20 / 13; object-fit: cover; }
.s-scene figcaption { padding: 16px 18px 18px; }
.s-benefits { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.s-benefits li { padding: 10px 16px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.s-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) {
  .s-hero, .s-demo, .s-grid, .s-grid-3 { grid-template-columns: 1fr; }
  .s-hero { gap: 24px; }
  .s-call { left: 12px; }
}
.s-samples { padding-left: 18px; }
.s-samples li { margin-bottom: 8px; }
.s-samples span { color: var(--ink-soft); }
.s-pref { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.s-pref legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; padding: 0; }
.s-pref label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.9rem; cursor: pointer; }
.s-pref label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.s-pref legend small { font-weight: 400; color: var(--ink-muted); }
.s-industries p { margin: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-soft); font-size: 0.95rem; }

/* Interactive demo (/demo/try/, demo-client.ts) */
.d-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.d-tabs [aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.d-panel { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }
.d-panel[hidden] { display: none; }
.d-site, .d-call, .d-owner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.d-call, .d-owner { padding: 16px; }
.d-site-bar { margin: 0; padding: 8px 12px; background: var(--page); font-size: 0.8rem; color: var(--ink-muted); }
.d-site-body { padding: 16px; }
.d-chat { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.d-msg { margin: 0; padding: 8px 12px; border-radius: 12px; max-width: 85%; background: var(--page); }
.d-msg span { display: block; font-size: 0.75rem; color: var(--ink-muted); }
.d-caller { align-self: flex-end; background: var(--line); }
.d-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.d-alert { padding: 10px 12px; border-radius: 10px; background: var(--page); }
.d-alert span { display: block; font-size: 0.75rem; color: var(--ink-muted); }
.d-owner[hidden] { display: none; }
.d-alerts { margin-top: 32px; }
.d-sms-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.d-sms { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.d-sms figcaption { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); }
.d-sms-head { margin: 6px 0 10px; font-weight: 600; }
.d-sms-head span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-muted); }
.d-sms-body { background: var(--page); border-radius: 12px 12px 12px 4px; padding: 10px 12px; }
.d-sms dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0; }
.d-sms dt { color: var(--ink-muted); }
.d-sms dd { margin: 0; }
.p-grade { margin-top: 24px; }

/* Product menu (layout.ts productMenuHtml): a native popover in the top layer, below the header. */
.m-nav-menu { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); cursor: pointer; }
.m-nav-menu:hover { color: var(--ink); }
.m-mega { position: fixed; inset: 72px 12px auto; margin: 0 auto; max-width: 980px; max-height: calc(100dvh - 90px); overflow: auto; overscroll-behavior: contain;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface, #fff); color: var(--ink); box-shadow: 0 18px 50px rgba(0,0,0,.12);
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.m-mega:popover-open { display: grid; }
.m-mega-group { display: flex; flex-direction: column; gap: 4px; }
.m-mega-title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.m-mega-tagline { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.9rem; }
.m-mega a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.m-mega a:hover, .m-mega a:focus-visible { background: var(--page); }
.m-mega a span { color: var(--ink-soft); font-size: 0.88rem; }
.m-mega-more { grid-column: 1 / -1; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.m-mega-more a { display: inline; padding: 0; margin: 0; }
@media (max-width: 760px) {
  .m-mega { grid-template-columns: 1fr; inset: 64px 8px auto; }
  .m-header nav { gap: 12px; }
  .m-header nav .m-nav-extra { display: none; }
}

/* Website gallery (/website-gallery/): a featured laptop + phone, filter chips (CSS :has), live thumbnails. */
.m-showcase { position: relative; margin: 32px 0 72px; padding: 0 8% 0 0; }
.m-laptop { border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -30px rgba(28,26,23,.45); border: 1px solid var(--line); }
.m-laptop-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.m-laptop-screen iframe { position: absolute; inset: 0; width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; pointer-events: none; }
.m-phone { position: absolute; right: 0; bottom: -40px; width: 230px; height: 470px; border-radius: 28px; padding: 8px; background: #111; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.m-phone-screen { position: relative; width: 100%; height: 100%; border-radius: 21px; overflow: hidden; background: #fff; }
.m-phone-screen iframe { position: absolute; top: 0; left: 0; width: 390px; height: 845px; border: 0; transform-origin: 0 0; transform: scale(var(--ps, .5487)); pointer-events: none; }
.m-gallery-bar { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; background: #f3efe8; border-bottom: 1px solid #e7e0d4; }
.m-gallery-bar span { width: 9px; height: 9px; border-radius: 50%; background: #f87171; } .m-gallery-bar span:nth-child(2) { background: #fbbf24; } .m-gallery-bar span:nth-child(3) { background: #34d399; }
.m-gallery-bar em { margin-left: 10px; font: 500 .75rem var(--mono); color: var(--ink-soft); font-style: normal; }
.m-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.m-filters input { position: absolute; opacity: 0; pointer-events: none; }
.m-filters label { cursor: pointer; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .92rem; }
.m-filters input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
.m-filters input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.m-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 22px; margin: 20px 0 48px; }
.m-gallery-card { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.m-gallery-shot { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 30px -18px rgba(28,26,23,.35); transition: transform .2s ease, box-shadow .2s ease; }
.m-gallery-frame { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.m-gallery-frame iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; border: 0; transform-origin: 0 0; transform: scale(0.25); pointer-events: none; }
.m-gallery-card strong { font-size: 1.05rem; margin-top: 6px; }
.m-gallery-card span { color: var(--ink-soft); font-size: .9rem; }
.m-gallery-card:hover .m-gallery-shot { transform: translateY(-4px); box-shadow: 0 24px 44px -20px rgba(28,26,23,.45); }
@media (prefers-reduced-motion: reduce) { .m-gallery-shot { transition: none; } .m-gallery-card:hover .m-gallery-shot { transform: none; } }
@media (max-width: 760px) { .m-showcase { padding: 0; } .m-phone { width: 130px; height: 266px; bottom: -30px; padding: 5px; border-radius: 20px; --ps: .3077; } .m-phone-screen { border-radius: 15px; } }

/* Trade pages (pages/trade-showcase.ts) */
.tp-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; margin: 8px 0 56px; }
.tp-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.05; margin: 8px 0 16px; }
.tp-hero-photo { margin: 0; position: relative; }
.tp-hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 24px; box-shadow: 0 30px 60px -20px rgba(28,26,23,.35); }
.tp-hero-photo::after { content: ''; position: absolute; inset: auto -14px -14px auto; width: 40%; height: 40%; border-radius: 24px; background: var(--brand-soft); z-index: -1; }
.tp-journey { background: var(--ink); color: #f5f1ea; border-radius: 28px; padding: clamp(28px, 5vw, 64px); margin: 0 0 56px; }
.tp-journey .m-eyebrow { color: #f0a58f; margin-top: 0; }
.tp-journey > h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 6px 0 36px; }
.tp-step { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: 28px 0; border-top: 1px solid rgba(255,255,255,.1); }
.tp-flip .tp-step-copy { order: 2; }
.tp-kicker { font: 500 0.75rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #f0a58f; margin: 0 0 6px; }
.tp-step h3 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; margin: 0 0 10px; }
.tp-step-copy > p { color: #d6cfc4; margin: 0 0 12px; }
.tp-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tp-points li { padding-left: 24px; position: relative; color: #e9e3d9; }
.tp-points li::before { content: '✓'; position: absolute; left: 0; color: #7fd6a5; font-weight: 700; }
.tp-points a { color: #fff; }
.tp-step-visual { background: linear-gradient(140deg, #2c2925, #3a332c); border-radius: 22px; padding: clamp(18px, 3vw, 32px); }
.tp-card { background: #fff; color: var(--ink); border-radius: 16px; padding: 16px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); font-size: .92rem; display: block; text-decoration: none; }
.tp-card p { margin: 0; }
.tp-card-head { font-weight: 600; font-size: .82rem; color: var(--ink-soft); margin-bottom: 10px !important; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tp-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); margin-right: auto; order: -1; }
.tp-bubble { padding: 9px 12px; border-radius: 14px; margin: 0 0 8px !important; max-width: 88%; line-height: 1.35; }
.tp-them { background: #f1ede6; border-bottom-left-radius: 4px; }
.tp-sam { background: var(--brand); color: #fff; margin-left: auto !important; border-bottom-right-radius: 4px; }
.tp-summary { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #ecfdf3; border: 1px solid #bbf0cf; font-size: .86rem; }
.tp-site { padding: 0; overflow: hidden; aspect-ratio: 16 / 11; position: relative; }
.tp-site iframe { position: absolute; inset: 0; width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; }
.tp-site-bar { display: flex; gap: 5px; margin-bottom: 14px !important; }
.tp-site-bar span { width: 9px; height: 9px; border-radius: 50%; background: #e5ded3; }
.tp-site-h { font: 700 1.5rem/1.1 var(--sans); }
.tp-site-sub { color: var(--ink-soft); margin: 6px 0 12px !important; }
.tp-site-btn { display: inline-block; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.tp-site-stars { margin-top: 12px !important; color: #f59e0b; } .tp-site-stars span { color: var(--ink-soft); }
.tp-slot { display: flex; gap: 12px; align-items: baseline; padding: 8px 10px; border-radius: 10px; border-left: 3px solid #e5ded3; margin-bottom: 6px !important; flex-wrap: wrap; }
.tp-slot span { font: 600 .8rem var(--mono); color: var(--ink-soft); }
.tp-slot em { font-style: normal; font-size: .75rem; color: #15803d; background: #dcfce7; padding: 1px 8px; border-radius: 999px; margin-left: auto; }
.tp-new { border-left-color: var(--brand); background: var(--brand-soft); }
.tp-paid { background: #dcfce7; color: #15803d; padding: 2px 10px; border-radius: 999px; font-size: .75rem; }
.tp-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed #eee6da; }
.tp-total { font-weight: 700; border-bottom: 0; }
.tp-note { margin-top: 8px !important; font-size: .78rem; color: var(--ink-soft); }
.tp-stars { color: #f59e0b; font-size: 1.3rem; margin-top: 4px !important; }
.tp-review-text { font-style: italic; color: var(--ink-soft); }
.tp-others { margin: 48px 0; }
.tp-others-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tp-others-row a { color: var(--ink); text-decoration: none; font-weight: 600; display: flex; flex-direction: column; gap: 8px; }
.tp-others-row img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; }
.m-wrap > .m-narrow { margin-left: auto; margin-right: auto; }
@media (max-width: 820px) {
  .tp-hero, .tp-step { grid-template-columns: 1fr; }
  .tp-flip .tp-step-copy { order: 0; }
  .tp-others-row { grid-template-columns: repeat(2, 1fr); }
}
.tp-browser { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 48px -16px rgba(0,0,0,.65); }
.tp-browser-bar { display: flex; align-items: center; gap: 6px; margin: 0; padding: 9px 12px; background: #f3efe8; border-bottom: 1px solid #e7e0d4; }
.tp-browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #e2d9cb; }
.tp-browser-bar span:first-child { background: #f87171; } .tp-browser-bar span:nth-child(2) { background: #fbbf24; } .tp-browser-bar span:nth-child(3) { background: #34d399; }
.tp-browser-bar em { margin-left: 10px; font: 500 .75rem var(--mono); color: var(--ink-soft); font-style: normal; text-transform: lowercase; }
.tp-browser .tp-site { display: block; aspect-ratio: 16 / 11; position: relative; overflow: hidden; }
