/* The site's one stylesheet: the "גיליון שרטוט" language (SP-14.09) over tokens.css. No colour literals
   here — every colour is a var(--vit-*) from tokens.css, generated from Design/vitruvius-tokens.json.
   External file, never a <style> tag: the CSP is style-src 'self'.
   The a11y-claim rules (SP-14.14: wrapping, skip link, focus, reduced motion) are marked "a11y". */

/* ── fonts: self-hosted Heebo (OFL, /assets/fonts/OFL-Heebo.txt) — no third-party font host ── */
@font-face { font-family: "Heebo"; src: url("/assets/fonts/Heebo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Heebo"; src: url("/assets/fonts/Heebo-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Heebo"; src: url("/assets/fonts/Heebo-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--vit-paper); }
body {
  margin: 0; background: var(--vit-paper); color: var(--vit-ink);
  font-family: var(--vit-f-heb); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; }
code { overflow-wrap: anywhere; }
a { overflow-wrap: break-word; }                                   /* a11y: no side scroll at 200% */
code, kbd, pre { font-family: var(--vit-f-mono); font-size: .88em; direction: ltr; unicode-bidi: isolate; }
table { max-width: 100%; border-collapse: collapse; }
/* URLs stay one string in the HTML (check:it-page reads them), so they wrap by CSS only. */
th:first-child { width: 42%; }
@media (max-width: 640px) {
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--vit-ink); padding: var(--vit-space-2) 0; }
  td { border: 0; padding: var(--vit-space-1) 0; }
  /* Heebo, not mono: the labels are Hebrew in he pages (the design rule) */
  td::before { content: attr(data-label); display: block; font-family: var(--vit-f-heb); font-weight: 500; font-size: 13px; color: var(--vit-ink-2); }
}
th, td { text-align: start; vertical-align: top; padding: var(--vit-space-2) var(--vit-space-3); border-bottom: 1px solid var(--vit-line-default); }
a { color: var(--vit-ink); text-decoration-color: var(--vit-clay); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--vit-ink); }
:focus-visible { outline: 2px solid var(--vit-clay-ink); outline-offset: 2px; }            /* a11y */
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; margin-top: .4em; }
h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p, li { max-width: 68ch; }
ul, ol { padding-inline-start: 1.3em; }

/* ── skip link (a11y): off-screen until focused ── */
/* Clipped, not pushed off-screen: in RTL an "inline-start: -10000px" lands on the right and widens the page. */
[data-skip]:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-skip]:focus { position: absolute; inset-inline-start: var(--vit-space-4); top: var(--vit-space-4); z-index: 20; padding: var(--vit-space-2) var(--vit-space-4); background: var(--vit-paper); color: var(--vit-ink); border: 2px solid var(--vit-ink); }

/* ── the sheet: every page is a drawing sheet on the table ── */
.sheet {
  /* full-bleed paper (map v10 / founder 08.10): no desk behind it, no margin, no frame around the page */
  margin: 0; background: var(--vit-paper); position: relative;
  min-height: 100vh; display: flex; flex-direction: column;
}
#content { flex: 1; }
#content { padding: 0 clamp(16px, 4vw, 48px) var(--vit-space-7); }
#content:focus { outline: none; }
main > h1:first-child { margin-top: var(--vit-space-6); }

/* ── drawing-sheet furniture: codes, title blocks ── */
.code { font-family: var(--vit-f-mono); font-size: 12px; letter-spacing: .06em; color: var(--vit-ink-2); unicode-bidi: isolate; text-transform: uppercase; }
.sheet-code { display: block; margin: var(--vit-space-6) 0 0; }
.title-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); border: 1px solid var(--vit-ink); }
.title-block > div { padding: var(--vit-space-3); border-inline-end: 1px solid var(--vit-ink); min-width: 0; overflow-wrap: break-word; }
.title-block > div:last-child { border-inline-end: 0; }
.title-block .code { display: block; margin-bottom: var(--vit-space-1); font-size: 11px; }

/* ── zones on the home page ── */
[data-zone] { position: relative; }
main > [data-zone]:not(.hero):not(.band) { padding-block: var(--vit-space-7); border-top: 1px solid var(--vit-line-default); }
main > [data-zone] h2 { font-size: clamp(28px, 4vw, 44px); margin-top: var(--vit-space-2); }
/* one dominant action per screen: zone CTAs are quieter than the hero's (still solid clay — the gate) */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--vit-space-6); align-items: center; padding: var(--vit-space-7) 0; border-bottom: 1px solid var(--vit-line-default); }
.hero h1 { font-size: clamp(32px, 5.2vw, 58px); margin: var(--vit-space-3) 0; }
.hero h1 .h1-sub { display: block; margin-top: var(--vit-space-3); font-size: .5em; font-weight: 500; color: var(--vit-ink-2); }
.hero .lead { font-size: 19px; color: var(--vit-ink-2); }
.hero .meta { margin-top: var(--vit-space-3); }
.plan { border: 1px solid var(--vit-ink); background: var(--vit-paper-2); padding: var(--vit-space-3); margin: 0; }
.plan svg { display: block; width: 100%; }
.plan .walls { fill: none; stroke: var(--vit-ink); stroke-width: 3; }
.plan .inner { fill: none; stroke: var(--vit-ink); stroke-width: 1.5; }
.plan .dim { stroke: var(--vit-line-strong); stroke-width: 1; }
.plan text { font-family: var(--vit-f-heb); font-size: 15px; fill: var(--vit-ink); }
.plan .scan { stroke: var(--vit-clay); stroke-width: 3; }
.plan figcaption { display: flex; justify-content: space-between; gap: var(--vit-space-3); margin-top: var(--vit-space-2); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding: var(--vit-space-6) 0; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--vit-ink); margin: var(--vit-space-5) 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding: var(--vit-space-5); border-inline-end: 1px solid var(--vit-ink); max-width: none; counter-increment: step; }
.steps li:last-child { border-inline-end: 0; }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--vit-f-mono); font-size: 13px; color: var(--vit-ink-3); margin-bottom: var(--vit-space-2); }
.steps strong { display: block; font-size: 18px; margin-bottom: var(--vit-space-1); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .steps li { border-inline-end: 0; border-bottom: 1px solid var(--vit-ink); } .steps li:last-child { border-bottom: 0; } }

.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--vit-space-5); margin: var(--vit-space-5) 0; }
.why div { border-top: 3px solid var(--vit-ink); padding-top: var(--vit-space-3); }
.why strong { display: block; font-size: 24px; line-height: 1.2; margin-bottom: var(--vit-space-2); }
@media (max-width: 820px) { .why { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--vit-space-5); margin: var(--vit-space-5) 0; }
.plans > div { border: 1px solid var(--vit-ink); padding: var(--vit-space-5); background: var(--vit-paper); }
.plans .amount { font-size: 30px; font-weight: 700; line-height: 1.2; margin: var(--vit-space-2) 0; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }

.band { background: var(--vit-clay); color: var(--vit-on-clay); margin: var(--vit-space-6) calc(-1 * clamp(16px, 4vw, 48px)) calc(-1 * var(--vit-space-7)); padding: var(--vit-space-7) clamp(16px, 4vw, 48px); border-top: 2px solid var(--vit-ink); }
.band h2 { margin-top: 0; font-size: clamp(24px, 3.4vw, 38px); }
.band a:not([data-cta]) { color: var(--vit-on-clay); }

/* ── footer: the sheet's title block ── */
.site-footer { border-top: 2px solid var(--vit-ink); }
.site-footer .title-block { border: 0; }
.site-footer a { display: inline-block; margin-inline-end: var(--vit-space-3); }
@media (max-width: 640px) { .site-footer .title-block > div { border-inline-end: 0; border-bottom: 1px solid var(--vit-ink); } }

/* account shell: three sign-in methods, stacked */
.signin { display: grid; gap: var(--vit-space-3); max-width: 360px; margin-top: var(--vit-space-4); }
.signin button { width: 100%; font: inherit; font-weight: 700; padding: var(--vit-space-3) var(--vit-space-5); border: 2px solid var(--vit-ink); border-radius: var(--vit-r-sm); background: var(--vit-paper); color: var(--vit-ink); cursor: pointer; }
/* not available yet: muted and dashed — it must not look like the clay call to action (design review) */
.signin button:disabled, .signin button[aria-disabled="true"] { background: var(--vit-paper-2); color: var(--vit-ink-3); border: 2px dashed var(--vit-ink-4); cursor: not-allowed; }

/* before/after screenshots on the product page: full width, captions in the title-block voice */
#before-after figure { margin: var(--vit-space-5) 0; }
#before-after img { display: block; width: 100%; max-width: 1000px; height: auto; border: 1px solid var(--vit-ink); background: var(--vit-paper-2); }
#before-after figcaption { margin-top: var(--vit-space-2); font-size: 14px; color: var(--vit-ink-2); max-width: 1000px; }

/* an isolated LTR run (file name, UI label, "Next → Install → Finish") never breaks inside itself: a split run re-orders its halves in an RTL line */
bdi[dir="ltr"] { white-space: nowrap; }

/* prices: number then ₪ everywhere — isolated LTR, so bidi never flips the sign (Price.astro) */
[data-price] { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

/* legal / long-form pages */
.toc { border: 1px solid var(--vit-ink); padding: var(--vit-space-3) var(--vit-space-5); margin: var(--vit-space-5) 0; max-width: 68ch; }
.toc-title { font-weight: 700; margin: 0; }
.toc ol { margin: var(--vit-space-2) 0 0; columns: 2 240px; }
.toc li { break-inside: avoid; }
[data-updated] { color: var(--vit-ink-3); font-size: 14px; margin-top: var(--vit-space-5); }

/* ── reduced motion (a11y): nothing moves ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── cart (design 10): button in the header, drawer, toast ── */
.cscrim { position: fixed; inset: 0; z-index: 30; background: var(--vit-ink); opacity: 0; }
.cscrim.open { opacity: .45; }
.cdrawer { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 31; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--vit-paper); border-inline-end: 2px solid var(--vit-ink); transform: translateX(100%); }
.cdrawer.open { transform: none; }
.cdrawer[hidden], .cscrim[hidden] { display: none; }
.cd-head { display: flex; align-items: center; justify-content: space-between; padding: var(--vit-space-4) var(--vit-space-5); border-bottom: 2px solid var(--vit-ink); }
.cd-head h3 { margin: 0; font-size: 20px; }
.cd-x { width: 36px; height: 36px; border: 2px solid var(--vit-ink); border-radius: var(--vit-r-sm); background: var(--vit-paper); color: var(--vit-ink); font: inherit; cursor: pointer; }
.cd-list { flex: 1; overflow: auto; list-style: none; margin: 0; padding: var(--vit-space-3) var(--vit-space-5); }
.cd-list li { max-width: none; display: grid; grid-template-columns: 1fr auto; gap: var(--vit-space-1) var(--vit-space-3); padding: var(--vit-space-3) 0; border-bottom: 1px solid var(--vit-line-default); }
.cd-list .nm { font-weight: 700; }
.cd-list .pr { font-family: var(--vit-f-mono); unicode-bidi: isolate; }
.cd-list .sub { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--vit-ink-3); font-size: 14px; }
.cd-rm { border: 0; background: none; color: var(--vit-ink); text-decoration: underline; text-decoration-color: var(--vit-clay); font: inherit; cursor: pointer; padding: 0; }
.cd-empty { padding: var(--vit-space-5); color: var(--vit-ink-3); }
.cd-foot { border-top: 2px solid var(--vit-ink); padding: var(--vit-space-4) var(--vit-space-5); }
.cd-tot { display: flex; justify-content: space-between; font-size: 18px; }
.cd-tot b { font-family: var(--vit-f-mono); unicode-bidi: isolate; }
.cd-note { min-height: 1.4em; margin: var(--vit-space-2) 0; font-size: 14px; color: var(--vit-ink-2); }
.cd-pay { display: block; text-align: center; padding: var(--vit-space-3) var(--vit-space-4); border: 2px solid var(--vit-ink); border-radius: var(--vit-r-sm); background: var(--vit-clay); color: var(--vit-on-clay); font-weight: 700; text-decoration: none; }
/* closed or unusable: muted and dashed, so it never looks like a working clay button */
.cd-pay[aria-disabled="true"] { background: var(--vit-paper-2); color: var(--vit-ink-3); border: 2px dashed var(--vit-ink-4); cursor: not-allowed; }
.ctoast { position: fixed; bottom: var(--vit-space-5); inset-inline-start: 50%; transform: translateX(-50%); z-index: 32; padding: var(--vit-space-2) var(--vit-space-4); background: var(--vit-ink); color: var(--vit-paper); border-radius: var(--vit-r-sm); opacity: 0; pointer-events: none; }
.ctoast.show { opacity: 1; }
/* the "add to cart" button: outlined, secondary to the clay purchase button */
.addc.added { border-style: dashed; }
@media (prefers-reduced-motion: no-preference) {
  .cdrawer { transition: transform .25s ease; }
  .cscrim { transition: opacity .25s ease; }
  .ctoast { transition: opacity .2s ease; }
  .cartbtn.bump { animation: cartbump .3s ease; }
  @keyframes cartbump { 50% { transform: scale(1.12); } }
}

/* ── cart refinements: quantity of the extra seat, scroll lock, LTR side, nothing live without JS ── */
.cd-q { display: inline-flex; align-items: center; gap: var(--vit-space-2); }
.cd-qb { width: 26px; height: 26px; padding: 0; border: 1.5px solid var(--vit-ink); border-radius: var(--vit-r-sm); background: var(--vit-paper); color: var(--vit-ink); font: inherit; line-height: 1; cursor: pointer; }
.cd-qb:disabled { border-style: dashed; color: var(--vit-ink-4); cursor: not-allowed; }
html.cart-open { overflow: hidden; }
html[dir="ltr"] .cdrawer:not(.open) { transform: translateX(-100%); }
html[dir="ltr"] .cdrawer { border-inline-end: 0; border-inline-start: 0; border-right: 2px solid var(--vit-ink); }
html:not(.js) .addc { display: none; }
html:not(.js) [data-fix] { pointer-events: none; }

/* ── the account portal's subscription panel (SP-13.10, portal/subscription.js) ── */
.subpanel { max-width: 640px; margin-top: var(--vit-space-6); padding: var(--vit-space-5); border: 1.5px solid var(--vit-ink); background: var(--vit-paper); }
.subpanel[hidden] { display: none; }
.subpanel .sub-title { margin: 0 0 var(--vit-space-3); font-size: 22px; }
.subpanel p { max-width: none; }
.subpanel .sub-more { color: var(--vit-ink-2); }
.subpanel [data-invoice-list] { list-style: none; margin: 0; padding: 0; }
.subpanel [data-invoice] { display: flex; flex-wrap: wrap; gap: var(--vit-space-2) var(--vit-space-4); padding: var(--vit-space-3) 0; border-bottom: 1px solid var(--vit-ink-2); }
/* "cancel" is a consequential, quiet action: outlined, never the clay of a purchase */
.cancelbtn { padding: var(--vit-space-3) var(--vit-space-5); border: 2px solid var(--vit-ink); border-radius: var(--vit-r-sm); background: var(--vit-paper); color: var(--vit-ink); font: inherit; font-weight: 700; cursor: pointer; }
.cancelbtn:hover:not(:disabled) { background: var(--vit-ink); color: var(--vit-paper); }
.cancelbtn:disabled { border-style: dashed; color: var(--vit-ink-3); cursor: progress; }

/* ── the account portal's data panel (SP-13.11, portal/account-data.js): export + delete with a double confirmation; same quiet outline as cancel ── */
.databtn { margin-inline-end: var(--vit-space-3); }
.data-export, .data-delete { margin-top: var(--vit-space-4); }
.data-confirm { margin-top: var(--vit-space-3); padding: var(--vit-space-4); border: 2px dashed var(--vit-ink); }
.data-confirm[hidden] { display: none; }
.data-confirm-text { font-weight: 700; margin-top: 0; }

/* ── the cart's validity (founder 06.10): why a cart cannot be paid, and the 10-seat cap ── */
.cd-invalid, .cd-cap { margin: var(--vit-space-2) 0; padding: var(--vit-space-3); border: 2px dashed var(--vit-ink); font-size: 14px; font-weight: 700; }
.cd-invalid[hidden], .cd-cap[hidden] { display: none; }

.cd-bill { margin: var(--vit-space-2) 0; display: grid; gap: var(--vit-space-1); }
.cd-bill label { font-size: 14px; font-weight: 700; }
.cd-bill input { font: inherit; padding: var(--vit-space-2); border: 2px solid var(--vit-ink); background: transparent; color: var(--vit-ink); min-height: 44px; }
.cd-hint { margin: 0 0 var(--vit-space-2); font-size: 13px; }
.cd-err { margin: 0; font-size: 14px; font-weight: 700; color: var(--vit-ink); border-inline-start: 4px solid var(--vit-ink); padding-inline-start: var(--vit-space-2); }
.cd-err[hidden] { display: none; }
.cd-paystatus { margin: var(--vit-space-2) 0; font-size: 14px; font-weight: 700; }
.cd-paystatus[hidden] { display: none; }
