/* Reset, typography, layout primitives. Logical properties only (inline/block), never left/right. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body, sans-serif); color: var(--ink, #000); background: var(--paper, #fff); line-height: 1.6; }
.hl-icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
[dir="rtl"] .hl-flip { transform: scaleX(-1); }
[dir="ltr"] .hl-flip-prev { transform: scaleX(-1); }
:focus-visible { outline: 2px solid var(--primary-strong, currentColor); outline-offset: 2px; }

/* Template-only chrome (tpl-*): never ported */
.tpl-main { max-width: 1040px; margin: 0 auto; padding: var(--s-5) var(--s-4) 120px; }
.tpl-sec { margin-block: var(--s-5); padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 0 0 1px var(--line); scroll-margin-block-start: var(--s-4); }
.tpl-sec h2 { margin: 0 0 var(--s-4); font-size: 18px; }
.tpl-box { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.tpl-pages { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tpl-pages a { padding: var(--s-2) var(--s-3); border: 1px solid var(--line, #ccc); border-radius: 8px; }
.tpl-pages a.is-todo { opacity: .5; pointer-events: none; }
.tpl-bar { position: fixed; inset-block-end: 12px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px 10px; background: #222; border-radius: 999px; font: 13px/1.4 system-ui, sans-serif; z-index: 999; }
.tpl-bar a { color: #fff; text-decoration: none; padding: 2px 8px; }
.tpl-bar a.is-state { background: #444; border-radius: 999px; }
.tpl-bar { flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); }
body:has(.tpl-bar) .hl-mapfab { inset-block-end: 64px; } /* clear the template bar */
.tpl-dots { display: inline-flex; gap: 6px; align-items: center; padding-inline: 6px; }
.tpl-bar a.tpl-dot { width: 18px; height: 18px; padding: 0; border-radius: 50%; box-shadow: 0 0 0 1px #777; }
.tpl-bar a.tpl-dot.is-on { box-shadow: 0 0 0 2px #fff; }
.tpl-logo { width: 180px; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.45; }
.tpl-shops { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.tpl-shop { overflow: hidden; display: grid; gap: 2px; padding: 0 var(--s-4) var(--s-4); border-radius: var(--r-lg); background: var(--surface); box-shadow: 0 16px 34px -14px rgb(28 26 26 / .3); }
.tpl-shop i { height: 72px; margin-inline: calc(var(--s-4) * -1); }
.tpl-shop span { display: grid; place-items: center; width: 60px; height: 60px; margin-block: -30px var(--s-2); border-radius: 50%; box-shadow: 0 0 0 4px var(--surface); font: 700 23px var(--font-display); }
.tpl-shop small { color: var(--ink-soft); }
.tpl-stack { display: grid; gap: var(--s-3); }
.tpl-board { background: var(--tenant-soft); }
.tpl-hero { position: relative; overflow: hidden; padding: var(--s-6) var(--s-4) 104px; color: var(--tenant-primary-text); background-color: var(--tenant-primary); }
.tpl-hero .hl-rise { width: min(300px, 32%); inset-block-end: 60px; inset-inline-end: max(16px, calc((100% - 1100px) / 2)); }
.tpl-hero__in { position: relative; max-width: 1100px; margin-inline: auto; }
.tpl-hero h1 { margin: 0 0 var(--s-3); font-size: clamp(34px, 5vw, 50px); font-weight: 700; }
.tpl-toc { display: flex; flex-wrap: wrap; gap: var(--s-2); max-width: 64%; }
.tpl-toc a { padding: 6px var(--s-3); border-radius: var(--r-pill); background: rgb(255 255 255 / .92); color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.tpl-bento { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; max-width: 1132px; margin: -68px auto 0; padding: 0 var(--s-4) 120px; }
.tpl-tile { grid-column: span 12; padding: 22px; border-radius: 26px; background: var(--surface); box-shadow: 0 22px 44px -28px rgb(28 26 26 / .4); scroll-margin-block-start: var(--s-4); }
.tpl-tile h2 { margin: 0 0 var(--s-4); font-size: 17px; font-weight: 600; }
.tpl-two { display: grid; gap: var(--s-3); }
@media (min-width: 800px) { .tpl-two { grid-template-columns: 1fr 1fr; } }
.tpl-after { margin: var(--s-4) 0 0; }
@media (min-width: 800px) { .tpl-w6 { grid-column: span 6; } }
@media (max-width: 600px) { .tpl-toc { max-width: none; } .tpl-hero .hl-rise { display: none; } }
.tpl-signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.tpl-errs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tpl-err { display: grid; gap: 8px; padding: 10px; border-radius: 18px; background: var(--panel); color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; text-decoration: none; }
.tpl-err .hl-till-screen { zoom: .4; }
.tpl-lead { color: var(--ink-soft); }
.tpl-mail { display: grid; gap: 10px; margin-block: 8px 28px; }
.tpl-mail h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.tpl-mail__frames { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tpl-mail iframe { max-width: 100%; height: 900px; border: 0; border-radius: 16px; background: #f4eee9; box-shadow: 0 0 0 1px var(--line); }
.tpl-mail__wide { width: 600px; }
.tpl-mail__phone { width: 360px; }
.tpl-fans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); }
.tpl-fan { display: grid; place-items: center; min-height: 200px; border-radius: 20px; background: var(--paper); }
.tpl-fan--red { background: var(--primary); }
.tpl-fan--ink { background: var(--ink); }
.tpl-fan[data-tenant] { background: var(--tenant-soft); }
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.tpl-onred { margin-block-start: var(--s-3); padding: var(--s-5); border-radius: 20px; background: var(--primary); }
.tpl-phone { max-width: 360px; padding: var(--s-4); border-radius: 32px; background: var(--ink); }
.tpl-phone--wide { max-width: 420px; }

/* Catalogue: customer parts inside .hl-biz get the customer page's look, without its page frame. */
.hl-biz.hl-biz.tpl-biz { display: block; grid-template-columns: none; gap: var(--s-3); min-height: 0; padding: 0; color: var(--ink); background: none; }
.hl-biz.hl-biz.tpl-cards, .hl-biz.hl-biz.tpl-stack, .hl-biz.hl-biz.tpl-wallets { display: grid; }
.hl-biz.hl-biz.tpl-cards, .hl-biz.hl-biz.tpl-wallets { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.tpl-wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.tpl-wallets > div { display: grid; gap: var(--s-2); justify-items: center; }
.tpl-label { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tpl-biz .hl-offers { margin-inline: 0; padding-inline: 0; }
