/* ==========================================================================
   area-marketing.css: page layout for /business, /international, /contact and /developers (Object UI).
   Loaded after site.css through head({ styles: ['/css/area-marketing.css'] }).
   Surfaces, not lines: sections are bands (oat, oat-deep, lichen), forms sit on a paper surface, lists are
   slips, the CSV sample is a docket, photos carry the tag chamfer. System tokens only; no borders or rules.
   Breakpoints are the system's three: 1180 / 960 / 640.
   ========================================================================== */

/* ---------- Shared: bands, section heads, type ---------- */
.mk-band { padding-block: clamp(64px, 8vw, 120px); }
.mk-band--first { padding-top: 0; }
.mk-h2 {
  margin: 0; max-width: 16ch; font-size: clamp(2rem, 3.8vw, 3.25rem); font-weight: 600; line-height: 1.02;
  letter-spacing: -.03em; text-wrap: balance;
}
.mk-lede { margin: 18px 0 0; max-width: 34em; text-wrap: pretty; font-size: 1.1875rem; line-height: 1.5; color: var(--fg-2); }
.band--lichen .mk-lede { color: var(--ink); }
.mk-sechead { margin-bottom: clamp(32px, 4vw, 52px); }
.mk-sechead .mk-h2 { max-width: 22ch; }
.mk-block { display: block; margin-top: 2px; }

/* ---------- Text beside a photo, with key rows (canvas Home dl rows) ---------- */
.mk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
.mk-split > * { min-width: 0; }
.mk-split--tall { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
.mk-split--tall .mk-h2 { max-width: 24ch; }
.mk-split--tall .mk-photo { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.mk-dl { display: grid; gap: 18px; margin: 36px 0 0; }
.mk-dl > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
.mk-dl dt { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.mk-dl dd { margin: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--fg-2); }
.band--lichen .mk-dl dd { color: var(--ink); }
.mk-more { margin-top: 28px; }

/* Photo: soft corners (round 3: no chamfer, no cut corners) */
.mk-photo { margin: 0; }
.mk-photo img {
  display: block; width: 100%; height: clamp(280px, 32vw, 440px); object-fit: cover; border-radius: 18px; background: var(--oat-deep);
}
.mk-photo--tall img {
  height: 0; min-height: 100%; object-position: 62% 50%;
}
.mk-photo__cap { margin-top: 10px; color: var(--fg-2); font-size: var(--small-size); }
.band--lichen .mk-photo__cap { color: var(--ink-2); }

/* Numbered slips: the number is a small mono figure at the start of the slip */
.mk-num { counter-reset: mk-num; }
.mk-num > .slip { position: relative; counter-increment: mk-num; padding: 14px 18px 15px 44px; line-height: 1.45; }
.mk-num > .slip::before {
  content: counter(mk-num); position: absolute; left: 18px; top: 16px; color: var(--ink-2); font-family: var(--f-mono); font-size: .75rem; line-height: 1.45;
}
* + .mk-num { margin-top: 28px; }

/* ---------- /business: bulk upload beside the CSV docket ---------- */
.mk-bulk { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 4vw, 56px); align-items: stretch; }
.mk-bulk > * { min-width: 0; }
.mk-csv { display: flex; flex-direction: column; margin: 0; }
.mk-csv .docket__note { margin-top: auto; padding-top: 16px; }
.mk-csv .docket__head { align-items: baseline; }
.mk-csv .docket__title { margin: 0; }
.mk-csv__scroll { overflow-x: auto; margin: 4px -4px 0; padding: 0 4px 4px; }
.mk-csv__scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-s); }
.mk-csv__table { border-collapse: collapse; font-family: var(--f-mono); font-size: .6875rem; line-height: 1.5; }
.mk-csv__table th, .mk-csv__table td { padding: 5px 16px 5px 0; text-align: left; white-space: nowrap; border: 0; background: none; }
.mk-csv__table th { padding-bottom: 8px; color: var(--ink-2); font-weight: 400; }
.mk-csv__table .num { text-align: right; }
.mk-csv__table tr > :last-child { padding-right: 0; }
.mk-csv__ok {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 12px 16px; border-radius: var(--r);
  background: var(--lichen); font-weight: 600;
}
.mk-csv__ok .i { color: var(--moss); }
.mk-csv .docket__note { max-width: 44em; font-size: var(--small-size); line-height: 1.45; }

/* The handover steps read in order: one card a row until the real table fits, so step 5 is never left alone at half width */
@media (min-width: 600px) and (max-width: 960px) {
  .mk-handover tbody { grid-template-columns: minmax(0, 1fr) !important; }
}
/* Webhook names are one word: they stay whole, and at the very narrowest they get the whole line under their label */
.mk-handover td.data { overflow-wrap: normal; }
@media (max-width: 360px) {
  .mk-handover td.data[data-label] { padding-left: 0 !important; padding-top: 22px !important; }
  .mk-handover td.data[data-label]::before { width: 100%; }
}

/* ---------- Forms on a paper surface (tokens flip via .surface-slip) ---------- */
.mk-formlayout { gap: clamp(32px, 4vw, 56px); }
.mk-form { min-width: 0; padding: clamp(22px, 3vw, 40px); border-radius: var(--r-xl); background: var(--slip); color: var(--ink); }
.mk-form__title { margin: 0 0 var(--s-5); }
.mk-group + .mk-group { margin-top: var(--s-6); }
.mk-group__title { display: block; float: none; width: 100%; padding: 0; margin-bottom: var(--s-4); }
.mk-consent__note { margin-top: 6px; padding-left: 34px; }
.mk-submit { margin-top: var(--s-6); }

/* Side column beside a form */
.mk-aside > * + * { margin-top: var(--s-4); }
.mk-aside > .t-h3 + .slips, .mk-aside > .t-h3 + .mk-call { margin-top: var(--s-3); }
.mk-aside .mk-aside__next { margin-top: var(--s-7); }
.mk-aside .mk-num { margin-top: var(--s-3); }

/* ---------- /international: the route line (terminal ●—● hub ●—○ door) and the handover rows ---------- */
.mk-route { margin: 0 0 clamp(48px, 6vw, 80px); }
.mk-route__stops {
  display: flex; align-items: flex-start; margin: 0; padding: 24px 28px 26px; list-style: none;
  border-radius: var(--r-l); background: var(--inset);
}
.mk-route__stop { position: relative; flex: 1 1 0; min-width: 0; display: grid; gap: 4px; padding: 28px 18px 0 0; }
.mk-route__stop:last-child { flex: 0 1 200px; padding-right: 0; }
.mk-route__stop::before {
  content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--moss);
}
.mk-route__stop:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; right: 8px; top: 5.5px; height: 2px; border-radius: 1px; background: var(--moss);
}
.mk-route__stop--end::before { background: transparent; box-shadow: inset 0 0 0 2px var(--moss); }
.mk-route__name { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.mk-route__where { color: var(--fg-2); font-size: var(--small-size); line-height: 1.4; max-width: 16em; }

.mk-subhead { margin: 0; }
.mk-subhead__meta { margin: 4px 0 var(--s-4); }
.mk-handover__n { width: 72px; }
.mk-handover__what { min-width: 18em; }
.mk-handover td.data { font-size: .75rem; }
.mk-statuses { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mk-statuses .st + .st { margin-left: 0; }
.mk-after { margin-top: var(--s-5); gap: var(--s-3) var(--s-6); }

/* ---------- /contact: phone card, team emails, depots as tags ---------- */
.mk-call { padding: 20px 22px 18px; border-radius: var(--r-l); background: var(--inset); }
.mk-call__label { margin: 0; font-size: var(--small-size); font-weight: 600; }
.mk-call__phone {
  display: inline-block; margin-top: 6px; color: var(--ink); font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 500;
  letter-spacing: -.02em; line-height: 1.2; text-decoration: none;
}
.mk-call__phone:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.mk-call__hours { margin: 6px 0 0; color: var(--ink-2); font-size: var(--small-size); }
.mk-mails > .slip { display: grid; gap: 2px; padding: 12px 18px 13px; overflow-wrap: anywhere; }
.mk-mails a { font-weight: 600; }
.mk-topics { grid-template-columns: minmax(0, 1fr); margin-top: var(--s-3); }
.mk-aside > .mk-topics { margin-top: var(--s-3); }

.mk-islands { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr); gap: var(--s-6) 20px; }
.mk-islands > * { min-width: 0; }
/* North and South tags end level: each island's grid fills the row */
.mk-island { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.mk-island__title { margin: 0 0 12px; }
.mk-depots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mk-island--3 .mk-depots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-island--2 .mk-depots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-depots .depot-tag { min-height: 178px; padding: 14px 16px 16px; }
.mk-depots .depot-tag__code { padding-bottom: 6px; }
.mk-depot__role { margin-top: 12px; font-size: var(--small-size); font-weight: 600; }
.mk-depot__regions { margin-top: 2px; color: var(--ink-2); font-size: var(--xs-size); line-height: 1.4; }
.depot-tag--hub .mk-depot__regions { color: var(--ink); }

/* ---------- /developers: docs layout, calm side nav, dark rounded code blocks ---------- */
.docs { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); align-items: start; padding-bottom: clamp(64px, 8vw, 120px); }
.docs__nav {
  position: sticky; top: var(--s-4); z-index: var(--z-sticky); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 16px 10px; border-radius: var(--r-l); background: var(--slip); font-size: var(--small-size);
}
.docs__navtitle { margin: 0 0 6px; padding: 0 12px; color: var(--ink-2); font-size: var(--xs-size); font-weight: 600; }
.docs__nav ul { margin: 0; padding: 0; list-style: none; }
.docs__nav li + li { margin-top: 2px; }
.docs__nav a { display: block; padding: 6px 12px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; line-height: 1.35; }
@media (hover: hover) { .docs__nav a:hover { background: var(--oat); } }
.docs__nav a[aria-current] { background: var(--lichen); font-weight: 600; }
.docs__nav li:has(.docs__sub a[aria-current]) > a { background: none; }
.docs__sub { margin: 2px 0 6px !important; }
.docs__sub a { padding-left: 24px; color: var(--ink-2); }
.docs__sub a[aria-current] { color: var(--ink); }

.docs__main { min-width: 0; max-width: 920px; }
.docs__sec { scroll-margin-top: var(--s-4); }
.docs__sec + .docs__sec { margin-top: clamp(64px, 7vw, 104px); }
.docs__sec > .t-h2 { font-size: clamp(1.75rem, 2.6vw, 2.375rem); letter-spacing: -.03em; }
.docs__sec > * + *, .docs__ep > * + * { margin-top: var(--s-4); }
.docs__sec > .t-h2 + * { margin-top: var(--s-5); }
.docs__sec > h3 { margin-top: var(--s-7); scroll-margin-top: var(--s-4); }
.docs__ep { margin-top: var(--s-8); scroll-margin-top: var(--s-4); }
.docs p, .docs li { max-width: 46em; }
.docs p code, .docs li code, .docs dd code {
  padding: 1px 6px; border-radius: 6px; background: var(--oat-deep); font-size: .84em; overflow-wrap: break-word; white-space: normal;
}
.docs a code { text-decoration: none; }
.docs .code code { font-size: inherit; padding: 0; background: none; border-radius: 0; }

/* Key facts on a paper surface */
.docs__facts { padding: 22px 26px; border-radius: var(--r-l); background: var(--slip); grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: 12px var(--s-6); }
.docs__facts code { background: var(--oat) !important; }
.docs__slips > .slip { max-width: none; padding: 13px 18px; }

/* Code block: ink, rounded, the caption as a quiet first line */
.docs .code-block { border-radius: var(--r-l); background: var(--ink); color: var(--on-dark); }
.docs .code__cap {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  padding: 16px 22px 0; background: none; color: var(--on-dark-2); font-size: var(--xs-size); font-weight: 600;
}
.docs .code__cap .mono { color: var(--sprout); font-size: .75rem; font-weight: 400; }
.docs .code-block .code {
  padding: 12px 22px 22px; background: none; color: var(--on-dark); font-family: var(--f-mono); font-size: .8125rem; line-height: 1.8;
}
.docs__nb { white-space: nowrap; }
.docs .code:focus-visible { outline: 2px solid var(--sprout); outline-offset: -4px; border-radius: var(--r); }
.docs .code-block ::selection { background: var(--sprout); color: var(--ink); }

/* Reference tables: dense slip rows */
.mk-doc-table .table thead th { white-space: nowrap; }
.mk-doc-table .table tbody th[scope="row"] { font-weight: var(--body-weight); vertical-align: top; }
.mk-doc-table .table td { vertical-align: top; }
.docs .mk-doc-table code { white-space: nowrap; overflow-wrap: normal; }

/* The reference tables stay tables once they fit (641px up): site.css stacks them into two-up cards up to 960px,
   which turns a 15-row list of regions into a page of half-empty cards. */
@media (min-width: 641px) and (max-width: 960px) {
  .mk-doc-table .table { display: table; width: 100%; }
  .mk-doc-table .table thead { display: table-header-group; }
  .mk-doc-table .table tbody { display: table-row-group; margin: 0; }
  .mk-doc-table .table tr { display: table-row; margin: 0; padding: 0; background: none; }
  .mk-doc-table .table :is(tbody th, td), .mk-doc-table .table td[data-label] { display: table-cell; padding: 9px 12px !important; background: var(--inset) !important; vertical-align: top; overflow-wrap: normal; }
  .mk-doc-table .table tbody tr > :first-child { padding-left: 16px !important; border-radius: 10px 0 0 10px !important; }
  .mk-doc-table .table tbody tr > :last-child { padding-right: 16px !important; border-radius: 0 10px 10px 0 !important; }
  .mk-doc-table .table td[data-label]::before { content: none; }
}
/* On phones each value sits under its label, so a long field name has the whole card and stays one word */
@media (max-width: 640px) {
  .mk-doc-table .table td[data-label] { padding-left: 0 !important; }
  .mk-doc-table .table td[data-label]::before { position: static; display: block; width: auto; }
  .docs__facts { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 18px; }
  .docs__facts dd { margin-bottom: 10px; }
  .docs__facts dd:last-child { margin-bottom: 0; }
  /* Code samples keep their lines and scroll sideways: a wrapped JSON token cannot be read or copied */
  .docs .code-block .code { white-space: pre; overflow-wrap: normal; }
}

/* ---------- Breakpoints ---------- */
@media (max-width: 1180px) {
  .mk-bulk { grid-template-columns: minmax(0, 1fr); }
  .mk-bulk__text { max-width: 44em; }
  .mk-islands { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .docs .mk-doc-table :is(th, td) { white-space: normal; }
  .docs .mk-doc-table code { white-space: normal; overflow-wrap: break-word; }
  .mk-handover__n { width: auto; }
  .mk-handover__what { min-width: 0; }
  .mk-split, .mk-split--tall { grid-template-columns: minmax(0, 1fr); }
  .mk-photo--tall img { height: 420px; min-height: 0; }
  .mk-route__stops { flex-direction: column; padding: 22px 22px 8px; }
  .mk-route__stop, .mk-route__stop:last-child { flex: none; padding: 0 0 20px 28px; }
  .mk-route__stop::before { top: 4px; }
  .mk-route__stop:not(:last-child)::after { left: 5.5px; right: auto; top: 23px; bottom: 2px; width: 2px; height: auto; }
  .mk-route__where { max-width: none; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .docs__nav { position: static; max-height: none; overflow: visible; }
  .docs__nav > ul { columns: 2; column-gap: var(--s-4); }
  .docs__nav > ul > li { break-inside: avoid; }
}
@media (max-width: 640px) {
  .mk-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mk-photo img { height: 240px; }
  .mk-photo--tall img { height: 300px; min-height: 0; }
  .mk-form { padding: 20px 16px 24px; border-radius: var(--r-l); }
  .mk-csv { padding-inline: 18px; }
  .mk-depots, .mk-island--3 .mk-depots, .mk-island--2 .mk-depots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* An odd last depot fills its row instead of leaving a gap */
  .mk-depots .depot-tag:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; }
  .docs__nav > ul { columns: 1; }
  .docs__sub { display: none; }
  .docs .code-block .code { padding: 10px 16px 18px; font-size: .75rem; }
  .docs .code__cap { padding: 14px 16px 0; }
}

/* ---------- Touch (≤ 960px or a finger): 44px tap areas, 12px smallest type ---------- */
@media (max-width: 960px), (pointer: coarse) {
  .mk-call__phone { display: inline-flex; align-items: center; min-height: 44px; }
  .mk-mails a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -9px; }
  .docs__nav a { display: flex; align-items: center; min-height: 44px; }
  .mk-csv__table { font-size: .75rem; }
}
