/* ==========================================================================
   wosh.productions — every inner page on the MARK SYSTEM
   --------------------------------------------------------------------------
   The skin that puts the site's shared components (site.css: page head,
   bands, splits, steps, stats, cards, FAQ, articles, tables, closing call)
   on the system without changing their markup. Everything is scoped to
   body.mk. scripts/mark/markup.py adds the files, the body class,
   the sprite and the night classes; the generators call it.
   Reference: /docs/mark-system.md (§7 lists what maps to what).
   Load after /assets/css/mark-system.css only: the closing band and the
   night overscroll from mark-page.css are repeated here, so these pages
   need one stylesheet less.
   ========================================================================== */

:root {
  /* parts of the mark as masks: the whole mark at 16 % with one part solid
     (section markers, coloured by background: var(--accent)) */
  --g-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill-opacity='.16' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3C/svg%3E");
  --g-arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill-opacity='.16' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath d='M-1.5 0H1.5V2.245A2.7 2.7 0 0 1 .5 2.653V1H-.5V2.653A2.7 2.7 0 0 1-1.5 2.245Z'/%3E%3C/svg%3E");
  --g-slot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill-opacity='.16' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath d='M-.5 1H.5V3.646H-.5Z'/%3E%3C/svg%3E");
  --g-gap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill-opacity='.16' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath d='M-1.5-3.36A3.68 3.68 0 0 1 1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5-2.245Z'/%3E%3C/svg%3E");
  --g-bar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill-opacity='.16' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath d='M-1.5 0H1.5V1H-1.5Z'/%3E%3C/svg%3E");
  --g-verticals: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill-opacity='.16' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='.24' d='M-1.5-3.68V3.68M-.5-3.68V3.68M.5-3.68V3.68M1.5-3.68V3.68'/%3E%3C/svg%3E");
  --g-construct: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill-opacity='.16' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='.24' d='M-3.68 0A3.68 3.68 0 1 0 3.68 0A3.68 3.68 0 1 0-3.68 0M-2.7 0A2.7 2.7 0 1 0 2.7 0A2.7 2.7 0 1 0-2.7 0M-3.68 0H3.68'/%3E%3C/svg%3E");
  --g-full: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3C/svg%3E");
  /* steps: the mark assembling, newest part in copper, last one chrome */
  --s-construct: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill='none' stroke='%230b0c0f' stroke-opacity='.45' stroke-width='.05' d='M-3.68 0A3.68 3.68 0 1 0 3.68 0A3.68 3.68 0 1 0-3.68 0M-2.7 0A2.7 2.7 0 1 0 2.7 0A2.7 2.7 0 1 0-2.7 0M-3.68 0H3.68'/%3E%3Cpath fill='none' stroke='%230b0c0f' stroke-opacity='.45' stroke-width='.05' d='M-1.5-3.68V3.68M-.5-3.68V3.68M.5-3.68V3.68M1.5-3.68V3.68'/%3E%3C/svg%3E");
  --s-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill='none' stroke='%230b0c0f' stroke-opacity='.45' stroke-width='.05' d='M-3.68 0A3.68 3.68 0 1 0 3.68 0A3.68 3.68 0 1 0-3.68 0M-2.7 0A2.7 2.7 0 1 0 2.7 0A2.7 2.7 0 1 0-2.7 0M-3.68 0H3.68'/%3E%3Cpath fill='none' stroke='%230b0c0f' stroke-opacity='.45' stroke-width='.05' d='M-1.5-3.68V3.68M-.5-3.68V3.68M.5-3.68V3.68M1.5-3.68V3.68'/%3E%3Cpath fill='%237a5744' d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3C/svg%3E");
  --s-legs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill='%230b0c0f' d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='%237a5744' d='M-1.5 1H-.5V2.653A2.7 2.7 0 0 1-1.5 2.245ZM.5 1H1.5V2.245A2.7 2.7 0 0 1 .5 2.653Z'/%3E%3C/svg%3E");
  --s-bar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath fill='%230b0c0f' d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='%230b0c0f' d='M-1.5 1H-.5V2.653A2.7 2.7 0 0 1-1.5 2.245ZM.5 1H1.5V2.245A2.7 2.7 0 0 1 .5 2.653Z'/%3E%3Cpath fill='%237a5744' d='M-1.5 0H1.5V1H-1.5Z'/%3E%3C/svg%3E");
  --s-full: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cdefs%3E%3ClinearGradient id='c' gradientUnits='userSpaceOnUse' x1='-3' y1='-3.7' x2='2.6' y2='3.7'%3E%3Cstop offset='0' stop-color='%23fcd4a3'/%3E%3Cstop offset='.28' stop-color='%23ba987f'/%3E%3Cstop offset='.5' stop-color='%233b3336'/%3E%3Cstop offset='.74' stop-color='%236a5652'/%3E%3Cstop offset='.9' stop-color='%238299bb'/%3E%3Cstop offset='1' stop-color='%23252126'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url%28%23c%29' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3C/svg%3E");
  /* the open ring with its verticals and diameter, for the night heads: a
     mask over the warm-to-cool light (a mask, not a background image, so it
     is never the LCP element; the h1 is) */
  --mk-stage-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4.6 -4.6 9.2 9.2'%3E%3Cpath fill='%23000' fill-opacity='.13' stroke='%23000' stroke-opacity='.5' stroke-width='1' vector-effect='non-scaling-stroke' d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='.22' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5-4.6V4.6M-.5-4.6V4.6M.5-4.6V4.6M1.5-4.6V4.6M-4.6 0H4.6'/%3E%3C/svg%3E");
}

/* ══ Head artwork by page family (data-mk-art on <body>, set by markup.py):
   the same light and mask as the ring above, a different part of the mark
   for each kind of page. Decorative (pseudo-elements) ═══════════════════ */
body.mk[data-mk-art="post"] {
  --mk-stage-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4.6 -4.6 9.2 9.2'%3E%3Cpath fill='%23000' fill-opacity='0.04' stroke='%23000' stroke-opacity='0.18' stroke-width='1' vector-effect='non-scaling-stroke' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='%23000' fill-opacity='0.16' stroke='%23000' stroke-opacity='0.55' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5 0H1.5V2.245A2.7 2.7 0 0 1 .5 2.653V1H-.5V2.653A2.7 2.7 0 0 1-1.5 2.245Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.22' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5-4.6V4.6M-.5-4.6V4.6M.5-4.6V4.6M1.5-4.6V4.6M-4.6 0H4.6'/%3E%3C/svg%3E");
}

body.mk[data-mk-art="tools"] {
  --mk-stage-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4.6 -4.6 9.2 9.2'%3E%3Cpath fill='%23000' fill-opacity='0.04' stroke='%23000' stroke-opacity='0.18' stroke-width='1' vector-effect='non-scaling-stroke' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.42' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5-4.6V4.6M-.5-4.6V4.6M.5-4.6V4.6M1.5-4.6V4.6'/%3E%3Cpath fill='%23000' fill-opacity='0.5' stroke='%23000' stroke-opacity='0.7' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.8-1.9h.6v.6h-.6ZM1.2.4h.6v.6h-.6Z'/%3E%3Cpath fill='%23000' fill-opacity='0.16' stroke='%23000' stroke-opacity='0.55' stroke-width='1' vector-effect='non-scaling-stroke' d='M-.5 1H.5V3.646H-.5Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.16' stroke-width='1' vector-effect='non-scaling-stroke' d='M-4.6 0H4.6'/%3E%3C/svg%3E");
}

body.mk[data-mk-art="payroll"] {
  --mk-stage-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4.6 -4.6 9.2 9.2'%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.11' stroke-width='1' vector-effect='non-scaling-stroke' d='M-4.5-4.6V4.6M-3.5-4.6V4.6M-2.5-4.6V4.6M-1.5-4.6V4.6M-0.5-4.6V4.6M0.5-4.6V4.6M1.5-4.6V4.6M2.5-4.6V4.6M3.5-4.6V4.6M4.5-4.6V4.6M-4.6 -4H4.6M-4.6 -3H4.6M-4.6 -2H4.6M-4.6 -1H4.6M-4.6 0H4.6M-4.6 1H4.6M-4.6 2H4.6M-4.6 3H4.6M-4.6 4H4.6'/%3E%3Cpath fill='%23000' fill-opacity='0.1' stroke='%23000' stroke-opacity='0.42' stroke-width='1' vector-effect='non-scaling-stroke' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.26' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5-4.6V4.6M-.5-4.6V4.6M.5-4.6V4.6M1.5-4.6V4.6'/%3E%3C/svg%3E");
}

body.mk[data-mk-art="case"] {
  --mk-stage-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4.6 -4.6 9.2 9.2'%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.38' stroke-width='1' vector-effect='non-scaling-stroke' d='M-3.68 0A3.68 3.68 0 1 0 3.68 0A3.68 3.68 0 1 0-3.68 0M-2.7 0A2.7 2.7 0 1 0 2.7 0A2.7 2.7 0 1 0-2.7 0'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.2' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5-4.6V4.6M-.5-4.6V4.6M.5-4.6V4.6M1.5-4.6V4.6M-4.6 0H4.6'/%3E%3Cpath fill='%23000' fill-opacity='0.07' stroke='%23000' stroke-opacity='0.3' stroke-width='1' vector-effect='non-scaling-stroke' d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3C/svg%3E");
}

body.mk[data-mk-art="404"] {
  --mk-stage-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4.6 -4.6 9.2 9.2'%3E%3Cpath fill='%23000' fill-opacity='0.13' stroke='%23000' stroke-opacity='0.5' stroke-width='1' vector-effect='non-scaling-stroke' d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='%23000' fill-opacity='0.13' stroke='%23000' stroke-opacity='0.5' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5 0H1.5V2.245A2.7 2.7 0 0 1 .5 2.653V1H-.5V2.653A2.7 2.7 0 0 1-1.5 2.245Z'/%3E%3Cpath fill='%23000' fill-opacity='0.1' stroke='%23000' stroke-opacity='0.5' stroke-width='1' vector-effect='non-scaling-stroke' transform='translate(1.15 -1.05) rotate(16)' stroke-dasharray='4 3' d='M-1.5-3.36A3.68 3.68 0 0 1 1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5-2.245Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.14' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5-4.6V4.6M-.5-4.6V4.6M.5-4.6V4.6M1.5-4.6V4.6M-4.6 0H4.6'/%3E%3C/svg%3E");
}

body.mk[data-mk-art="index"] {
  --mk-stage-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4.6 -4.6 9.2 9.2'%3E%3Cpath fill='%23000' fill-opacity='0.12' stroke='%23000' stroke-opacity='0.5' stroke-width='1' vector-effect='non-scaling-stroke' transform='translate(0 -.9)' d='M-1.5-3.36A3.68 3.68 0 0 1 1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5-2.245Z'/%3E%3Cpath fill='%23000' fill-opacity='0.13' stroke='%23000' stroke-opacity='0.5' stroke-width='1' vector-effect='non-scaling-stroke' d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3Cpath fill='%23000' fill-opacity='0.13' stroke='%23000' stroke-opacity='0.5' stroke-width='1' vector-effect='non-scaling-stroke' transform='translate(0 -.55)' d='M-1.5 0H1.5V1H-1.5Z'/%3E%3Cpath fill='%23000' fill-opacity='0.13' stroke='%23000' stroke-opacity='0.5' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5 1H-.5V2.653A2.7 2.7 0 0 1-1.5 2.245ZM.5 1H1.5V2.245A2.7 2.7 0 0 1 .5 2.653Z'/%3E%3Cpath fill='%23000' fill-opacity='0.2' stroke='%23000' stroke-opacity='0.6' stroke-width='1' vector-effect='non-scaling-stroke' transform='translate(0 .9)' d='M-.5 1H.5V3.646H-.5Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='0.16' stroke-width='1' vector-effect='non-scaling-stroke' d='M-1.5-4.6V4.6M-.5-4.6V4.6M.5-4.6V4.6M1.5-4.6V4.6'/%3E%3C/svg%3E");
}

/* The blog index: its number card stands inside the taken-apart mark. The
   card is narrower than the ring, so both arms of the ring show whole beside
   it, the gap piece above and the slot below; the card's notch sits on the
   centre line, under the mark's own gap (off-centre it read as a tab). */
body.mk[data-mk-art="index"] .mk-night .answer-card {
  --nx: calc(50% - var(--nw) / 2);
  width: min(100%, 392px);
}

@media (min-width: 960px) {
  body.mk[data-mk-art="index"] .mk-night .page-head__grid::before {
    width: min(136%, 700px);
  }
}

/* Dark-topped and dark-bottomed pages: the overscroll above the head and
   below the footer stays night (Marko: the white bounce ruined the site) */
html {
  background: var(--night);
}

/* ══ Page head: the night stage ═══════════════════════════════════════════
   Every inner page opens on the stage (scripts/mark/markup.py adds
   .mk-night to header.page-head). The h1 stays plain text and the LCP
   element; nothing here waits for JS. */
body.mk .page-head.mk-night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding: calc(var(--nav-h) + var(--m-2)) 0 var(--m-ri);
}

/* the stage's beam, aimed at the presented object (right half) */
body.mk .page-head.mk-night::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle min(40vmax, 720px) at 74% 46%, rgba(252, 212, 163, .085), transparent 62%),
    radial-gradient(ellipse 50% 60% at 76% 50%, rgba(130, 153, 187, .06), transparent 70%);
  pointer-events: none;
}

/* The mark's open ring with its verticals and diameter, the construction
   the page grid comes from. Heads without a picture show it on the right;
   heads with one (split) put it behind the picture instead (below). */
body.mk .page-head.mk-night::after,
body.mk .mk-night .page-head__grid::before {
  content: "";
  z-index: -1;
  aspect-ratio: 1;
  background: linear-gradient(165deg, #fcd4a3 0%, #ba987f 38%, #8299bb 100%);
  -webkit-mask: var(--mk-stage-ring) center / contain no-repeat;
  mask: var(--mk-stage-ring) center / contain no-repeat;
  pointer-events: none;
}

/* as tall as the head below the nav (square, so its width follows),
   capped so it never reaches the copy */
body.mk .page-head.mk-night::after {
  position: absolute;
  top: calc(var(--nav-h) + var(--m-h));
  bottom: var(--m-h);
  right: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
  width: auto;
  max-width: 36vw;
  max-height: 620px;
  margin: auto 0;
}

/* phones: less stage under the copy, so what follows (a tool, a table)
   comes up sooner */
@media (max-width: 600px) {
  body.mk .page-head.mk-night {
    padding-bottom: var(--m-3);
  }
}

@media (max-width: 899px) {

  /* phones: cropped by the right edge, behind the text, quieter */
  body.mk .page-head.mk-night::after {
    top: auto;
    bottom: calc(var(--m) * -3);
    right: -32vw;
    width: 88vw;
    transform: none;
    opacity: .55;
  }
}

body.mk .page-head--split.mk-night::after {
  display: none;
}

/* the picture stands inside the ring: ring, picture and copy are placed
   explicitly so the ring can share the picture's cell */
body.mk .mk-night .page-head__grid {
  position: relative;
  isolation: isolate;
}

body.mk .mk-night .page-head__grid::before {
  grid-row: 2;
  grid-column: 1;
  align-self: center;
  justify-self: center;
  width: min(112%, 560px);
  margin: calc(var(--m) * -2) 0;
}

body.mk .mk-night .page-head__grid>:first-child {
  grid-row: 1;
  grid-column: 1;
}

body.mk .mk-night .page-head__grid>:last-child:not(:only-child) {
  grid-row: 2;
  grid-column: 1;
  position: relative;
}

@media (min-width: 960px) {
  body.mk .mk-night .page-head__grid {
    grid-template-columns: minmax(0, 4.18fr) minmax(0, 3.18fr);
  }

  body.mk .mk-night .page-head__grid::before {
    grid-row: 1;
    grid-column: 2;
    width: min(118%, 600px);
    margin: 0;
  }

  body.mk .mk-night .page-head__grid>:last-child:not(:only-child) {
    grid-row: 1;
    grid-column: 2;
  }
}

/* heads with nothing but the copy (a lone child) keep one column */
body.mk .mk-night .page-head__grid:has(>:only-child)::before {
  display: none;
}

/* the ring arrives with the page; the picture comes through the slot */
.mk-js body.mk .mk-night .page-head__grid::before,
.mk-js body.mk .page-head.mk-night::after {
  animation: mk-ring-fade 1.8s var(--ease-arrive) both;
}

.mk-js body.mk .page-head.mk-night .page-head__grid>.mock:last-child {
  animation: mk-slot var(--dur-4) .25s both;
}

@keyframes mk-ring-fade {
  from {
    opacity: 0;
  }
}

body.mk .page-head.mk-night .crumbs,
body.mk .page-head.mk-night .crumbs a {
  color: var(--n-muted);
}

body.mk .page-head.mk-night .crumbs a:hover,
body.mk .page-head.mk-night .crumbs [aria-current] {
  color: var(--n-ink);
}

body.mk .page-head.mk-night .crumbs li+li::before {
  color: var(--n-line);
}

body.mk .page-head .crumbs+.eyebrow,
body.mk .page-head .crumbs+.page-head__grid {
  margin-top: var(--m-2);
}

body.mk .page-head h1 {
  margin-top: var(--m);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

body.mk .page-head--split h1 {
  text-wrap: wrap;
}

body.mk .page-head .lede {
  margin-top: var(--m);
}

body.mk .page-head.mk-night .lede {
  color: var(--n-ink);
}

body.mk .page-head .btn-row {
  margin-top: var(--m-2);
}

body.mk .page-head__meta {
  gap: var(--m-q) var(--m);
  margin-top: var(--m-2);
  padding-top: var(--m-h);
}

body.mk .mk-night .page-head__meta {
  border-top-color: var(--n-line);
  color: var(--n-muted);
}

body.mk .mk-night .page-head__meta strong {
  color: var(--n-ink);
}

body.mk .mk-night .eyebrow a:hover {
  color: var(--n-ink);
}

/* The presented object on the stage keeps the day surface: the answer
   card of the payroll pages, the blog index's number card */
body.mk .mk-night :is(.answer, .answer-card, .contact-card) {
  --ink: var(--d-ink);
  --paper: var(--d-paper);
  --wash: var(--d-wash);
  --muted: var(--d-muted);
  --hairline: var(--d-line);
  --accent: var(--d-ink);
  --focus: var(--d-ink);
  color: var(--ink);
  background: var(--paper);
}

body.mk .mk-night :is(.answer, .answer-card, .contact-card) .eyebrow {
  color: var(--muted);
}

body.mk .mk-night :is(.answer, .answer-card, .contact-card) .btn--solid {
  background: var(--d-ink);
  border-color: var(--d-ink);
  color: var(--d-paper);
}

body.mk .mk-night :is(.answer, .answer-card, .contact-card) .btn--ghost {
  color: var(--d-ink);
  border-color: var(--d-line);
}

body.mk .mk-night :is(.answer, .answer-card, .contact-card) .btn--ghost:hover {
  background: var(--d-ink);
  border-color: var(--d-ink);
  color: var(--d-paper);
}

/* ══ Section markers: a part of the mark ═════════════════════════════════
   CSS only (no markup per section): the part comes from the section's
   place on the page (ring, arch, slot, gap, bar, verticals, construction,
   as on the pilot). No generated numbers: several pages number their
   eyebrows in the text already. */
body.mk {
  --g: var(--g-ring);
}

body.mk main section:nth-of-type(7n+2) {
  --g: var(--g-arch);
}

body.mk main section:nth-of-type(7n+3) {
  --g: var(--g-slot);
}

body.mk main section:nth-of-type(7n+4) {
  --g: var(--g-gap);
}

body.mk main section:nth-of-type(7n+5) {
  --g: var(--g-bar);
}

body.mk main section:nth-of-type(7n+6) {
  --g: var(--g-verticals);
}

body.mk main section:nth-of-type(7n+7) {
  --g: var(--g-construct);
}

body.mk :is(.page-head, .close-cta, .svc-band) {
  --g: var(--g-full);
}

body.mk :is(.band__head, .page-head .shell, .page-head__grid>:first-child, .close-cta .shell)>.eyebrow:first-of-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--m-q) .9em;
}

body.mk :is(.band__head, .page-head .shell, .page-head__grid>:first-child, .close-cta .shell)>.eyebrow:first-of-type::before {
  content: "";
  flex: none;
  order: -2;
  width: var(--m-2);
  height: var(--m-2);
  background: var(--accent);
  -webkit-mask: var(--g) center / contain no-repeat;
  mask: var(--g) center / contain no-repeat;
}

/* ══ Bands: rhythm, the slot cut, the grid ════════════════════════════════ */
body.mk main .band {
  padding: var(--m-ri) 0;
  overflow-x: clip;
}

body.mk main .band--tight {
  padding: var(--m-R) 0;
}

body.mk .band__head .lede {
  margin-top: var(--m);
}

body.mk .band__head h2 {
  margin-top: var(--m-h);
}

body.mk .band__head+:is(.prose, .split__body, .note, ul, ol, p) {
  margin-top: var(--m);
}

/* the slot in each section's top edge: through it you see the section
   before (a one-slot notch on the page's centre line, as on the pilot) */
body.mk main :is(section.band, section.close-cta, section.tool-related):not(:first-child) {
  --cut-w: max(var(--m-3), calc((min(100vw, var(--shell)) - 2 * var(--gutter)) * .1358));
  --cut-h: var(--m);
  position: relative;
  margin-top: calc(-1 * var(--cut-h));
  clip-path: polygon(0 0,
      calc(50% - var(--cut-w) / 2) 0,
      calc(50% - var(--cut-w) / 2) var(--cut-h),
      calc(50% + var(--cut-w) / 2) var(--cut-h),
      calc(50% + var(--cut-w) / 2) 0,
      100% 0, 100% 100%, 0 100%);
}

/* two night bands in a row (the Svjetlarna case) read as one stage: the
   seam between them gets one radius of space, not two section paddings
   (it left a screen of empty night before the figures) */
body.mk main section.band.mk-night:has(+ section.band.mk-night:not(.svc-band)),
body.mk .case-night section.band:has(+ section.band:not(.svc-band)) {
  padding-bottom: var(--m-R);
}

body.mk main section.band.mk-night+section.band.mk-night:not(.svc-band),
body.mk .case-night section.band+section.band:not(.svc-band) {
  padding-top: var(--m-R);
}

/* paper sections show their grid: the mark's four verticals */
body.mk main section.band:not(.band--wash):not(.mk-night):not(.svc-band) {
  position: relative;
  isolation: isolate;
}

body.mk main section.band:not(.band--wash):not(.mk-night):not(.svc-band)::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  right: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  pointer-events: none;
  --l: var(--mk-vline, var(--d-line-2));
  background: linear-gradient(90deg,
      transparent calc(29.62% - .5px), var(--l) 0 calc(29.62% + .5px),
      transparent 0 calc(43.21% - .5px), var(--l) 0 calc(43.21% + .5px),
      transparent 0 calc(56.79% - .5px), var(--l) 0 calc(56.79% + .5px),
      transparent 0 calc(70.38% - .5px), var(--l) 0 calc(70.38% + .5px),
      transparent 0);
}

body.mk .mk-night {
  --mk-vline: var(--n-line-2);
}

/* night bands (ink bands on the case studies, the closing bands) */
body.mk .mk-night .lede {
  color: var(--n-muted);
}

body.mk .mk-night .split__body>.lede:first-child,
body.mk .mk-night .svc-band .lede {
  color: var(--n-ink);
}

body.mk .mk-night .rows,
body.mk .mk-night .rows a {
  border-color: var(--n-line);
}

body.mk .mk-night .rows a::before {
  background: var(--sun);
}

body.mk .mk-night .rows em {
  background: var(--n-ink);
  color: var(--night);
}

/* ══ Steps: the mark assembles itself, one part per step ══════════════════
   construction → ring → legs → bar → the whole mark in chrome (the last
   step); the newest part in copper. */
body.mk .steps {
  margin-top: var(--m-R);
  gap: var(--m-2) var(--m);
}

body.mk .band__head+.steps {
  margin-top: var(--m-R);
}

body.mk .step {
  position: relative;
  padding-top: var(--m);
}

body.mk .step::before {
  content: counter(step, decimal-leading-zero);
  display: flex;
  align-items: center;
  height: var(--m-3);
  margin-bottom: var(--m);
  font: 500 var(--t-1)/1 var(--mono);
  letter-spacing: .14em;
}

body.mk .step::after {
  content: "";
  position: absolute;
  top: var(--m);
  right: 0;
  width: var(--m-3);
  height: var(--m-3);
  background: var(--s-construct) center / contain no-repeat;
}

body.mk .step:nth-last-child(4)::after {
  background-image: var(--s-ring);
}

body.mk .step:nth-last-child(3)::after {
  background-image: var(--s-legs);
}

body.mk .step:nth-last-child(2)::after {
  background-image: var(--s-bar);
}

body.mk .step:last-child::after {
  background-image: var(--s-full);
}

body.mk .mk-night .step:not(:last-child)::after {
  filter: invert(1);
}

body.mk .step h3 {
  font-size: var(--t1);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

body.mk .step p {
  margin-top: var(--m-h);
}

/* ══ Stats: numbers at display size, each under its own hairline ═════════ */
body.mk .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--m);
  margin-top: var(--m-R);
  padding-top: 0;
  border-top: 0;
}

body.mk :is(.result, .answer) .stats {
  margin-top: 0;
}

body.mk .stat {
  padding-top: var(--m);
  border-top: 1px solid var(--hairline);
}

body.mk .stat strong {
  font-size: clamp(var(--t3), 4.4vw, var(--t5));
  line-height: .95;
  letter-spacing: -0.05em;
}

body.mk .stat span {
  display: block;
  max-width: 30ch;
  margin-top: var(--m-h);
}

/* ══ Frames: cards, the article's service card, notes ═════════════════════
   Square, filled (no border, which the notch would break), the slot cut
   one module wide, two modules in. Hover: the slot deepens in ink. */
body.mk .grid {
  gap: var(--m);
}

body.mk :is(.card, .toc-card, .answer, .answer-card, .calc) {
  --nx: var(--m-2);
  --nw: var(--m);
  --nh: var(--m-h);
  position: relative;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(0 0, var(--nx) 0, var(--nx) var(--nh), calc(var(--nx) + var(--nw)) var(--nh), calc(var(--nx) + var(--nw)) 0, 100% 0, 100% 100%, 0 100%);
}

body.mk .card {
  gap: var(--m-h);
  padding: var(--m-2) var(--m) var(--m);
  background: var(--wash);
  transition: background-color var(--dur-2) var(--ease-arrive), opacity var(--dur-3) var(--ease-arrive), transform var(--dur-3) var(--ease-arrive);
}

body.mk :is(.band--wash, .tool-related) .card {
  background: var(--paper);
}

body.mk a.card::after {
  content: "";
  position: absolute;
  left: var(--nx);
  top: var(--nh);
  width: var(--nw);
  height: var(--m);
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-2) var(--ease-arrive);
}

body.mk a.card:hover {
  transform: none;
  background: var(--d-wash);
}

body.mk :is(.band--wash, .tool-related) a.card:hover {
  background: #fbfaf7;
}

body.mk a.card:hover::after,
body.mk a.card:focus-visible::after {
  transform: none;
}

/* the frame clips anything outside it, so focus is drawn inside */
body.mk :is(a.card, .tcard):focus-visible {
  outline-offset: -4px;
}

body.mk .card h3 {
  font-size: var(--t1);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

body.mk :is(.card__kicker, .card__meta) {
  font-family: var(--mono);
  font-size: var(--t-1);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* slabs (price and service groups): filled cells a hairline apart, one
   frame with the slot notch */
body.mk .slabs {
  --nx: var(--m-2);
  --nw: var(--m);
  --nh: var(--m-h);
  margin-top: var(--m-R);
  gap: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  clip-path: polygon(0 0, var(--nx) 0, var(--nx) var(--nh), calc(var(--nx) + var(--nw)) var(--nh), calc(var(--nx) + var(--nw)) 0, 100% 0, 100% 100%, 0 100%);
}

body.mk .slab {
  padding: var(--m-2) var(--m) var(--m);
  background: var(--wash);
  transition: background-color var(--dur-2) var(--ease-arrive);
}

body.mk .band--wash .slab {
  background: var(--paper);
}

body.mk a.slab:hover {
  background: var(--d-wash);
}

body.mk .band--wash a.slab:hover {
  background: #fbfaf7;
}

body.mk :is(.slab h2, .slab h3) {
  font-size: var(--t1);
  font-weight: 500;
  letter-spacing: -0.03em;
}

body.mk .slab__price {
  font-family: var(--mono);
  font-size: var(--t-1);
  letter-spacing: .1em;
}

body.mk .slabs--plans .slab__price {
  font-family: inherit;
  letter-spacing: 0;
}

body.mk a.slab:focus-visible {
  outline-offset: -4px;
}

/* notes: the slot as the left edge */
body.mk .note {
  border: 0;
  border-radius: 0;
  background: var(--wash);
  box-shadow: inset 3px 0 0 var(--ink);
  padding: var(--m) var(--m) var(--m) calc(var(--m) + 3px);
}

/* Payroll pages carry one service box ("Naša usluga") among their own
   notes (disclaimers, how the numbers are counted). The service box is the
   only filled frame, with the notch; the other notes keep just the slot as
   their left edge, so the page shows one box, not three alike. */
body.mk:has(aside.note[aria-label="Naša usluga"]) .note:not(aside[aria-label="Naša usluga"]) {
  background: transparent;
  padding-top: var(--m-h);
  padding-bottom: var(--m-h);
}

body.mk aside.note[aria-label="Naša usluga"] {
  --nx: var(--m-2);
  --nw: var(--m);
  --nh: var(--m-h);
  padding: var(--m-2) var(--m) var(--m);
  box-shadow: none;
  clip-path: polygon(0 0, var(--nx) 0, var(--nx) var(--nh), calc(var(--nx) + var(--nw)) var(--nh), calc(var(--nx) + var(--nw)) 0, 100% 0, 100% 100%, 0 100%);
}

/* Small print under a table or a tool: sources, footnotes, the basis of a
   calculation. A plain paragraph (it used to borrow .article-meta, a flex
   row for the head's facts, which tore sentences apart at every link) */
.fine-print {
  margin-top: var(--m);
  max-width: 72ch;
  font-size: .88rem;
  line-height: 1.6;
  font-weight: 300;
  color: var(--muted);
}

.fine-print a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.mk .band--wash .note {
  background: var(--paper);
}

/* ══ Articles ═════════════════════════════════════════════════════════════ */
body.mk .art-body {
  padding: var(--m-2) 0 var(--m-ri);
}

body.mk .toc ol {
  margin-top: var(--m-h);
}

body.mk .toc ol a {
  position: relative;
}

body.mk .toc ol a::before {
  font-family: var(--mono);
  font-weight: 500;
}

/* the current heading carries the slot */
body.mk .toc ol a::after {
  content: "";
  position: absolute;
  left: calc(var(--m-h) * -1 - 1px);
  top: .75rem;
  bottom: .75rem;
  width: 3px;
  background: var(--ink);
  transform: scaleY(0);
  transition: transform var(--dur-2) var(--ease-arrive);
}

body.mk .toc ol a[aria-current="true"]::after {
  transform: none;
}

/* The contents column stays with the reader. site.css aligns the grid's
   items to the start, so the aside was exactly as tall as the list and the
   sticky list had nowhere to go: the column stretches to the text's height
   and the contents (list, then the service card) stick inside it. The card
   is always whole: when the window is short, only the list gives way and
   scrolls on its own (1440 × 789 cut the card's button off when the whole
   column scrolled). */
@media (min-width: 900px) {
  body.mk .split--article>aside {
    align-self: stretch;
  }

  body.mk .split--article>aside>.toc {
    position: sticky;
    top: calc(var(--nav-h, 72px) + var(--m));
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--nav-h, 72px) - var(--m-2));
    max-height: calc(100dvh - var(--nav-h, 72px) - var(--m-2));
  }

  body.mk .split--article>aside>.toc>* {
    flex: none;
  }

  body.mk .split--article>aside>.toc>ol {
    flex: 0 1 auto;
    min-height: calc(var(--m) * 4);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    /* room for the slot marker, which sits just left of the links */
    margin-left: calc(var(--m-h) * -1 - 4px);
    padding-left: calc(var(--m-h) + 4px);
    /* the list's top rule moves onto the first item, so every rule starts
       on the text's edge, not in the marker's room */
    border-top: 0;
  }

  body.mk .split--article>aside>.toc>ol>li:first-child {
    border-top: 1px solid var(--hairline);
  }
}

/* heads of the article's own bands (FAQ, related) sit in the 280 px
   contents column: one step of the scale, not the section size, so a
   heading is two lines there instead of four */
@media (min-width: 900px) {
  body.mk .split--article>.band__head h2 {
    font-size: var(--t3);
  }
}

body.mk .toc-card {
  margin-top: var(--m-2);
  padding: var(--m-2) var(--m) var(--m);
  background: var(--wash);
}

body.mk .toc-card .btn {
  margin-top: var(--m);
}

body.mk .toc-m {
  border-radius: 0;
}

body.mk .prose h2 {
  font-weight: 500;
  letter-spacing: -0.035em;
}

body.mk .prose blockquote {
  border-left-width: 3px;
}

body.mk .prose :is(img, pre),
body.mk .prose figure img {
  border-radius: 0;
}

/* ── Tables: square, mono heads over an ink rule ─────────────────────── */
body.mk .table-scroll {
  border: 0;
  border-radius: 0;
}

body.mk .table-scroll table {
  border-bottom: 1px solid var(--hairline);
}

body.mk .table-scroll thead th {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: .1em;
  background: transparent;
  border-bottom: 1px solid var(--ink);
}

@media (max-width: 720px) {
  body.mk .table-scroll thead th {
    letter-spacing: .02em;
  }
}

body.mk .table-scroll tbody tr:hover {
  background: var(--wash);
}

body.mk .band--wash .table-scroll tbody tr:hover {
  background: var(--paper);
}

/* Tables in a post's text keep the text's measure: as wide as their
   content, never wider than the paragraphs around them (a bank-holiday
   table ran across the whole column, 1011 px beside 68ch of text). A
   wider table scrolls inside that measure. */
body.mk .split--article .prose>.table-scroll {
  width: fit-content;
  min-width: 0;
  max-width: min(100%, 68ch);
}

/* Scrollable tables say so: a soft shadow at the edge that has more
   (the classic "scroll shadows": covers that scroll with the content hide
   the shadows at the ends). The covers take the surface's colour. */
body.mk .table-scroll {
  --ts-bg: var(--paper);
  background:
    linear-gradient(90deg, var(--ts-bg) 30%, transparent) left / 48px 100% no-repeat local,
    linear-gradient(270deg, var(--ts-bg) 30%, transparent) right / 48px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(11, 12, 15, .16), transparent) left / 16px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(11, 12, 15, .16), transparent) right / 16px 100% no-repeat scroll;
}

body.mk :is(.band--wash, .answer, .calc, .card) .table-scroll {
  --ts-bg: var(--wash);
}

/* ── Answer cards (payroll pages, blog index) ────────────────────────── */
body.mk .answer,
body.mk .answer-card {
  padding: var(--m-2) var(--m) var(--m);
}

body.mk .answer {
  background: var(--wash);
}

body.mk .answer-card__big,
body.mk .answer__big {
  letter-spacing: -0.055em;
}

/* (the same closing band as the pilot's, from mark-page.css, which these
   pages don't load: one render-blocking request less) */
.mk-close {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding: var(--m-D) 0 var(--m-ri);
}

.mk-close__mark {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: max(0px, calc((100vw - var(--shell)) / 2));
  width: min(46vw, 640px);
  height: auto;
  aspect-ratio: 1;
  transform: translateY(-50%);
  overflow: visible;
}

.mk-close h2 {
  margin-top: var(--m);
  max-width: 13ch;
  font-size: clamp(var(--t3), 7vw, var(--t6));
  line-height: .94;
  letter-spacing: -0.05em;
}

.mk-close .lede {
  margin-top: var(--m);
  max-width: 44ch;
}

.mk-close .btn-row {
  margin-top: var(--m-2);
}

@media (max-width: 900px) {
  .mk-close__mark {
    top: var(--m);
    right: -24vw;
    width: 96vw;
    transform: none;
  }
}

/* ══ Closing band: the construction drawing and the last call ═════════════
   markup.py turns .close-cta into .mk-close .mk-night with the drawing;
   the band is left-aligned like the pilot's. */
body.mk .close-cta.mk-close {
  text-align: left;
}

body.mk .close-cta.mk-close h2 {
  max-width: 15ch;
  margin-inline: 0;
  font-size: clamp(var(--t3), 5.6vw, var(--t5));
  line-height: .96;
}

body.mk .close-cta.mk-close .lede {
  margin: var(--m) 0 0;
  text-align: left;
}

body.mk .close-cta.mk-close .btn-row {
  justify-content: flex-start;
  margin-top: var(--m-2);
}

/* ══ A post's or case's closing band: the same closing band ══════════════
   One closing band everywhere: the service band takes the closing band's
   padding, heading and construction drawing (markup.py inserts it); the
   service's picture stands in the drawing, where the ring was. */
body.mk .svc-band.mk-night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding: var(--m-D) 0 var(--m-ri);
}

body.mk .svc-band.mk-night .page-head__grid::before {
  display: none;
}

body.mk .svc-band.mk-night h2 {
  margin-top: var(--m);
  max-width: 15ch;
  font-size: clamp(var(--t3), 5.6vw, var(--t5));
  line-height: .96;
  letter-spacing: -0.05em;
}

body.mk .svc-band.mk-night .lede {
  margin-top: var(--m);
  max-width: 44ch;
}

body.mk .svc-band.mk-night .btn-row {
  margin-top: var(--m-2);
}

body.mk .svc-band.mk-night .mock {
  position: relative;
  z-index: 1;
}

@media (min-width: 960px) {
  body.mk .svc-band.mk-night .page-head__grid {
    align-items: center;
  }
}

/* ══ Lists of rows, topics, splits ════════════════════════════════════════ */
body.mk .topics {
  margin-top: var(--m-2);
}

body.mk .split__body>.lede+.prose {
  margin-top: var(--m);
}

/* ══ Work, people, projects: square pictures ══════════════════════════════ */
body.mk :is(.work__shot, .team-card__photo, .person-card__photo, .profile-head__photo, .case-media, .case-media img, .case-fig img, .case-fig video, .case-video, .case-tile, .case-poster img, .case-banner img, .case-model, .tcard__icon) {
  border-radius: 0;
}

body.mk .work__label span:first-child {
  font-weight: 500;
  letter-spacing: -0.01em;
}

body.mk .work__result {
  font-family: inherit;
}

/* The page grid's verticals run under the cards, not through their text:
   each card is a paper body (the lines show in the gaps only). */
body.mk .work__item {
  position: relative;
  background: var(--paper);
  padding-bottom: var(--m-h);
}

/* No orphans (2026-11-09, /projekti/ and /en/projects/): no card is ever
   alone on the last row. Wide screens: six (or nine) in rows of three,
   five as three over two (a six-column grid), three in one row. Tablets:
   pairs; an odd count puts its first card wide over the pairs. Phones:
   one column. */
@media (min-width: 1100px) {
  body.mk .work:is(:has(> .work__item:nth-child(6):last-child), :has(> .work__item:nth-child(9):last-child)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.mk .work:has(> .work__item:nth-child(5):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body.mk .work:has(> .work__item:nth-child(5):last-child) > .work__item {
    grid-column: span 2;
  }

  body.mk .work:has(> .work__item:nth-child(5):last-child) > .work__item:nth-child(n+4) {
    grid-column: span 3;
  }
}

@media (min-width: 640px) and (max-width: 1099px) {
  body.mk .work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.mk .work:has(> .work__item:nth-child(odd):last-child) > .work__item:first-child {
    grid-column: 1 / -1;
  }

  body.mk .work:has(> .work__item:nth-child(odd):last-child) > .work__item:first-child .work__shot {
    aspect-ratio: 21 / 9;
  }
}

body.mk .team-card h3,
body.mk .team-card h2 {
  letter-spacing: -0.03em;
}

body.mk .case-facts dt {
  font-family: var(--mono);
  font-size: var(--t-1);
  font-weight: 500;
  letter-spacing: .14em;
}

/* ══ Forms (contact) ══════════════════════════════════════════════════════ */
body.mk .form textarea,
body.mk .form input:not([type="checkbox"]):not([type="radio"]),
body.mk .contact-card {
  border-radius: 0;
}

body.mk .form legend {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: .14em;
}

/* ══ Tools ════════════════════════════════════════════════════════════════
   The tools keep their own controls; their outer frame turns square (a
   hairline frame keeps its line: the notch is for filled frames only), and
   stands a little below the night head. */
body.mk .tool-wrap {
  padding-top: var(--m-2);
}

@media (max-width: 600px) {
  body.mk .tool-wrap {
    padding-top: 0;
  }
}

body.mk :is(.pdfx, .ocr, .tx, .ic, .qr, .cc, .tool) {
  position: relative;
  border-radius: 0;
}

body.mk .result {
  --nx: var(--m-2);
  --nw: var(--m);
  --nh: var(--m-h);
  border: 0;
  border-radius: 0;
  clip-path: polygon(0 0, var(--nx) 0, var(--nx) var(--nh), calc(var(--nx) + var(--nw)) var(--nh), calc(var(--nx) + var(--nw)) 0, 100% 0, 100% 100%, 0 100%);
}

/* dialogs, pads, fields and pictures inside the tools: square */
body.mk :is(.pdfx-dialog, .pdfx-pad, .pdfx-toast, .ocr-toast, .tx-toast, .ic-toast, .qr-toast, .cc .toast.error,
  .ic-format, .qr-form textarea, .qr-form select, .qr-seg label, .qr-preview canvas, .tx-player video,
  .tool input:not([type="radio"]):not([type="checkbox"]), .tool select, .tool textarea, .tool table input,
  .cj-app input:not([type="radio"]):not([type="checkbox"]), .cj-app select, .cj-app textarea) {
  border-radius: 0;
}

body.mk .tool legend {
  font-family: var(--mono);
  font-weight: 500;
}

body.mk .tool legend {
  font-size: var(--t-1);
}

/* drop zones: the icon sits in the open ring */
body.mk .tool-drop__icon {
  border: 0;
  background: var(--paper);
  -webkit-mask: none;
  box-shadow: none;
  position: relative;
}

body.mk .tool-drop__icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  background: var(--ink);
  opacity: .35;
  -webkit-mask: var(--mk-ring-url) center / contain no-repeat;
  mask: var(--mk-ring-url) center / contain no-repeat;
}

body.mk .tool-drop:hover .tool-drop__icon::after,
body.mk .tool-drop.is-over .tool-drop__icon::after {
  opacity: 1;
}

/* hub cards (/alati/, /en/tools/, /alati-za-place/): filled frames */
body.mk .tcard {
  --nx: var(--m-2);
  --nw: var(--m);
  --nh: var(--m-h);
  border: 0;
  border-radius: 0;
  background: var(--wash);
  clip-path: polygon(0 0, var(--nx) 0, var(--nx) var(--nh), calc(var(--nx) + var(--nw)) var(--nh), calc(var(--nx) + var(--nw)) 0, 100% 0, 100% 100%, 0 100%);
  transition: background-color var(--dur-2) var(--ease-arrive), opacity var(--dur-3) var(--ease-arrive), transform var(--dur-3) var(--ease-arrive);
}

body.mk .band--wash .tcard {
  background: var(--paper);
}

body.mk .tcard:hover {
  transform: none;
  background: var(--d-wash);
}

body.mk .band--wash .tcard:hover {
  background: #fbfaf7;
}

body.mk .tcard__icon {
  border-radius: 0;
  background: var(--paper);
}

body.mk .band--wash .tcard__icon {
  background: var(--wash);
}

body.mk .tool-related {
  background: var(--paper);
}

/* phones: the tool's first button stays on the first screen (tools.css),
   so the night head is as compact there as before */
@media (max-width: 600px) {
  body.mk[data-tool-chrome="site"] .page-head.mk-night {
    padding: calc(var(--nav-h) + 1.75rem) 0 1.4rem;
  }

  body.mk[data-tool-chrome="site"] .page-head h1 {
    margin-top: .8rem;
  }

  body.mk[data-tool-chrome="site"] .page-head .lede {
    margin-top: .8rem;
  }

  /* the section marker carries the way back to the hub ("Alati · PDF"),
     so the breadcrumb steps aside on a phone and the first button stays
     where it was */
  body.mk[data-tool-chrome="site"] .page-head .crumbs {
    display: none;
  }

  body.mk[data-tool-chrome="site"] .page-head .crumbs+.eyebrow {
    margin-top: 0;
  }

  /* the head's facts: the shared plain inline style (strong + muted), not
     the pills tools.css draws (they read as buttons) */
  body.mk[data-tool-chrome="site"] .page-head__meta {
    margin-top: 1rem;
    padding-top: .6rem;
    border-top: 1px solid var(--n-line);
    gap: .15rem .9rem;
    font-size: .8rem;
  }

  body.mk[data-tool-chrome="site"] .page-head__meta p {
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  body.mk[data-tool-chrome="site"] .page-head.mk-night::after {
    display: none;
  }
}

/* ══ Remaining boxes from page styles: square (the quiz on the security
   posts, the case palette and type cards, the price list preview) ═════ */
body.mk :is(.triage, .check, .cta-box, .case-swatch, .case-type, .cj-app .preview, .cj-app tr) {
  border-radius: 0;
}

/* ══ Print: paper only ════════════════════════════════════════════════════ */
@media print {
  html {
    background: #fff;
  }

  body.mk .mk-night {
    --ink: #000;
    --muted: rgba(0, 0, 0, .62);
    --hairline: rgba(0, 0, 0, .2);
    --n-ink: #000;
    --n-muted: rgba(0, 0, 0, .62);
    --n-line: rgba(0, 0, 0, .2);
    --sun: #000;
    --accent: #000;
    background: #fff !important;
    color: #000;
  }

  body.mk {
    background: #fff;
  }

  body.mk .page-head.mk-night::before,
  body.mk .page-head.mk-night::after,
  body.mk .mk-night .page-head__grid::before,
  body.mk main section.band::before,
  body.mk .eyebrow::before,
  .mk-construct,
  .mk-progress,
  .mk-cursor {
    display: none !important;
  }

  body.mk main :is(section.band, section.close-cta, section.tool-related):not(:first-child),
  body.mk :is(.card, .toc-card, .answer, .answer-card, .calc) {
    clip-path: none;
    margin-top: 0;
  }

  body.mk .page-head.mk-night {
    padding: 0 0 1rem;
  }
}

/* ══ Reduced motion: still and complete ═══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  .mk-js body.mk .mk-night .page-head__grid::before,
  .mk-js body.mk .page-head.mk-night::after,
  .mk-js body.mk .page-head.mk-night .page-head__grid>.mock:last-child {
    animation: none;
  }

  body.mk a.card::after,
  body.mk .toc ol a::after {
    transition: none;
  }
}
