/* Miftah: owner's statement page. Paper, ink, mangrove for money in, cost red for money out. */
@font-face {
  font-family: "Anuphan";
  src: url("fonts/anuphan-vf-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anuphan";
  src: url("fonts/anuphan-vf-latin-ext.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Alyamama";
  src: url("fonts/alyamama-vf-arabic.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --paper: #FFFFFF;
  --ink: #121614;
  --mangrove: #4F7330;
  --red: #9E3B4A;
  --mist: #EEF1EF;
  --graphite: #59605C;
  --rule: #D9DEDB;
  --r: 14px;
  --pill: 999px;
  --gut: clamp(20px, 4vw, 56px);
  --max: 1328px;
  --bar: 64px;
  --sans: "Anuphan", "Alyamama", system-ui, sans-serif;
  --arab: "Alyamama", "Anuphan", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html { background: var(--paper); color: var(--ink); scroll-padding-top: calc(var(--bar) + 16px); }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
  overflow-x: clip;
}
em, i { font-style: normal; }
html[lang="en"] [data-l="ar"], html[lang="ar"] [data-l="en"] { display: none !important; }
[lang="ar"], html[lang="ar"] body { font-family: var(--arab); letter-spacing: 0; }
[data-l="ar"] { font-size: 1.12em; }
html[lang="ar"] body { line-height: 1.8; }
html[lang="ar"] :is(h1, h2, h3, h4) { line-height: 1.4; letter-spacing: 0; }
.num, .fig { font-family: var(--sans); font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; display: inline-block; }
bdi { unicode-bidi: isolate; }

h1, h2, h3, h4, p, ol, ul, dl, dd, figure, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
input, button, textarea { font: inherit; color: inherit; }
img { height: auto; }
:focus-visible { outline: 2px solid var(--mangrove); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -80px; z-index: 50; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--pill); text-decoration: none; }
.skip:focus { top: 12px; }

.eyebrow { font-size: 14px; font-weight: 500; color: var(--graphite); }
.hero-copy .eyebrow { color: var(--ink); }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--ink); max-width: 36em; }
.muted { color: var(--graphite); }
.in { color: var(--mangrove); }
.out { color: var(--red); }

/* Buttons: pill, 48px, one hover style (fill darkens to ink) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--pill);
  font-size: 16px; font-weight: 550; text-decoration: none; border: 1px solid transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  cursor: pointer; white-space: normal; text-align: center; padding-block: 10px; line-height: 1.25;
}
.btn-go { background: var(--mangrove); color: var(--paper); }
.btn-go:hover { background: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-quiet:hover { border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }
html[dir="rtl"] .btn .dir { transform: scaleX(-1); }
.link { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; }
.link:hover { color: var(--mangrove); }

/* ---------- Top bar ---------- */
.bar { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--rule); }
.bar-in { display: flex; align-items: center; gap: 24px; height: var(--bar); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; flex: none; }
.mark svg { width: 30px; height: 30px; }
.mark .mark-ar { font-family: var(--arab); font-weight: 600; font-size: 20px; color: var(--graphite); letter-spacing: 0; }
.mark .sep { width: 1px; height: 18px; background: var(--rule); }
.tabs { display: flex; gap: 4px; margin-inline: auto; }
.tab {
  position: relative; background: none; border: 0; padding: 0 18px; height: var(--bar);
  font-size: 16px; font-weight: 500; color: var(--graphite); cursor: pointer;
}
.tab::after { content: ""; position: absolute; inset-inline: 18px; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform .35s var(--ease); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab:hover { color: var(--ink); }
.tab:focus-visible { outline-offset: -6px; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--pill); padding: 3px; flex: none; }
.lang button { border: 0; background: none; min-width: 44px; height: 38px; border-radius: var(--pill); font-size: 15px; font-weight: 600; color: var(--graphite); cursor: pointer; }
.lang button[lang="ar"] { font-family: var(--arab); font-size: 18px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Panels ---------- */
[role="tabpanel"]:focus { outline: none; }
.panel-enter { animation: panelIn .45s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero: the statement over the flat ---------- */
.hero { position: relative; display: grid; grid-template-columns: var(--gut) minmax(0, 1fr) var(--gut); }
.hero-copy { grid-column: 2; grid-row: 1; padding-block: 40px 32px; position: relative; z-index: 2; }
.hero-copy h1 {
  font-size: clamp(40px, 7.4vw, 64px); line-height: 1.02; font-weight: 560; letter-spacing: -0.03em;
  margin-block: 14px 18px; max-width: 12em;
}
html[lang="ar"] .hero-copy h1 { letter-spacing: 0; font-weight: 600; }
.hero-copy .lede { max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo { grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 0; height: clamp(300px, 64vw, 560px); overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
html[dir="rtl"] .hero-photo img { transform: scaleX(-1); }
.sheet-wrap { grid-column: 2; grid-row: 3; position: relative; z-index: 3; margin-top: -132px; }

.sheet {
  position: relative; background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--mangrove);
  padding: 20px 20px 18px; width: 100%;
}
.sheet-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--graphite); }
.sheet-top .who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.sheet-top svg { width: 20px; height: 20px; }
.sheet h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin-top: 14px; line-height: 1.25; }
.sheet .meta { font-size: 14px; color: var(--graphite); margin-top: 4px; line-height: 1.5; }
.st-cols, .st-line { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; }
.st-cols { margin-top: 16px; padding: 8px 10px; border-block: 1px solid var(--rule); font-size: 12px; font-weight: 600; color: var(--graphite); }
.st-cols span:last-child, .st-line .amt { text-align: end; }
.st-lines li { border-bottom: 1px solid var(--rule); }
.st-line {
  width: 100%; background: none; border: 0; padding: 12px 10px; text-align: start; cursor: pointer; font-size: 15px; line-height: 1.35;
  transition: background-color .25s var(--ease);
}
.st-line .d { font-size: 13px; color: var(--graphite); }
.st-line .amt { font-weight: 600; font-size: 16px; }
.st-line:hover, .st-line[aria-expanded="true"] { background: var(--mist); }
.st-line:focus-visible { outline-offset: -2px; }
.st-total { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 12px; padding: 16px 10px 14px; border-bottom: 3px double var(--ink); }
.st-total .lbl { font-size: 17px; font-weight: 600; }
.st-total .big { font-size: clamp(30px, 3vw, 38px); font-weight: 600; color: var(--mangrove); letter-spacing: -0.02em; line-height: 1; text-align: end; }
.st-total .alt { grid-column: 1 / -1; text-align: end; font-size: 14px; color: var(--graphite); }
.st-foot { font-size: 13px; color: var(--graphite); margin-top: 12px; line-height: 1.5; }
.st-hint { font-size: 13px; color: var(--ink); margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.st-hint::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mangrove); flex: none; }

/* Proof card */
.proof { margin-top: 16px; }
.proof[hidden] { display: none; }
.proof-card { background: var(--paper); border: 1px solid var(--rule); padding: 16px; font-size: 13px; line-height: 1.45; }
.proof-card h3 { font-size: 13px; font-weight: 600; color: var(--graphite); margin-bottom: 10px; }
.proof-card .row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dotted var(--rule); }
.proof-card .row:last-of-type { border-bottom: 0; }
.proof-card .row b { font-weight: 600; }
.proof-card .tot { border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 8px; font-weight: 600; display: flex; justify-content: space-between; }
.proof-card .note { color: var(--graphite); margin-top: 8px; }
.proof-card img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 10px; }

/* The drawn cheque */
.cheque { position: relative; background: var(--paper); border: 1px solid var(--ink); padding: 12px 14px 10px; font-size: 12px; line-height: 1.35; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; }
.cheque .ch-no { color: var(--graphite); align-self: start; }
.cheque .ch-date { display: flex; gap: 3px; align-self: start; }
.cheque .ch-date > span { border: 1px solid var(--rule); padding: 1px 4px; font-weight: 600; }
.cheque .ch-pay, .cheque .ch-words { grid-column: 1 / -1; border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.cheque .ch-pay b { font-weight: 600; font-size: 12.5px; }
.cheque .ch-xing { justify-self: start; border-block: 1px solid var(--ink); padding: 1px 6px; font-size: 10px; transform: rotate(-6deg); color: var(--graphite); white-space: nowrap; }
.cheque .ch-amt { border: 1px solid var(--ink); padding: 3px 9px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.cheque .ch-micr { color: var(--graphite); letter-spacing: .1em; font-size: 10.5px; }
html[lang="ar"] .cheque .ch-micr { letter-spacing: 0; }
.cheque .sig { display: flex; flex-direction: column; align-items: center; }
.cheque .sig svg { width: 96px; height: 22px; }
.cheque .sig .sig-line { border-top: 1px solid var(--ink); padding-top: 2px; color: var(--graphite); font-size: 10.5px; min-width: 104px; text-align: center; }
.proof-card .row b, .proof-card .tot > span:last-child { white-space: nowrap; text-align: end; }

/* ---------- Statement line sections ---------- */
.lines { padding-top: 96px; }
.line { padding-bottom: 96px; }
.line-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; align-items: baseline;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding-block: 22px 20px;
}
.line-row h2 { font-size: clamp(30px, 4.6vw, 64px); font-weight: 560; letter-spacing: -0.025em; line-height: 1.05; }
html[lang="ar"] .line-row h2 { letter-spacing: 0; }
.line-fig { font-size: clamp(30px, 4.6vw, 64px); font-weight: 560; letter-spacing: -0.02em; line-height: 1.05; text-align: end; }
.line-unit { grid-column: 2; text-align: end; font-size: 14px; color: var(--graphite); margin-top: 6px; }
.line-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 32px; padding-top: 40px; }
.line-body > .txt { grid-column: 1 / span 5; }
.line-body > .media { grid-column: 7 / span 6; }
.line-body h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 560; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 16px; }
html[lang="ar"] .line-body h3 { letter-spacing: 0; }
.line-body p + p { margin-top: 14px; }
.ruled { margin-top: 24px; border-top: 1px solid var(--rule); }
.ruled > div, .ruled > li { display: grid; grid-template-columns: minmax(110px, 0.42fr) minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.ruled dt, .ruled .k { font-weight: 600; }
.ruled dd { color: var(--ink); }
.ph { margin: 0; }
.ph picture, .ph img { display: block; width: 100%; border-radius: var(--r); }
.ph img { aspect-ratio: 16 / 9; object-fit: cover; }
.ph figcaption { font-size: 14px; color: var(--graphite); margin-top: 10px; max-width: 46em; }

/* Communities: tall panels */
.communities { grid-column: 1 / -1; margin-top: 40px; }
.communities-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.panels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.panel { display: flex; flex-direction: column; min-height: 580px; }
.p-visual { position: relative; flex: 0 0 auto; height: clamp(260px, 25vw, 360px); min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; border-radius: var(--r); overflow: hidden; }
.p-visual picture { position: absolute; inset: 0; }
.p-visual picture img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.p-data { padding: 16px 2px 0; }
.p-data dl { border-top: 1px solid var(--ink); }
.p-data dl > div:last-child { border-bottom: 1px solid var(--rule) !important; }
.p-name { font-size: 20px; font-weight: 600; line-height: 1.25; margin-bottom: 8px; }
.p-name .ar { display: block; font-family: var(--arab); font-weight: 600; color: var(--graphite); font-size: 19px; }
.p-data dl > div { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--rule); font-size: 14px; }
.p-data dl > div:last-child { border-bottom: 0; }
.p-data dd { font-weight: 600; text-align: end; }

/* Cheques control and calendar */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--mist); border-radius: var(--pill); }
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label > span { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: var(--pill); font-size: 15px; font-weight: 500; color: var(--graphite); transition: background-color .3s var(--ease), color .3s var(--ease); white-space: nowrap; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg label > span > span { color: inherit; }
.seg input:focus-visible + span { outline: 2px solid var(--mangrove); outline-offset: 2px; }
.seg label:hover input:not(:checked) + span { color: var(--ink); background: var(--paper); }
.cheque-ctl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.cal-sum { grid-column: 1 / -1; font-size: 15px; color: var(--ink); border-top: 1px solid var(--rule); padding-top: 14px; }
.cal-wrap { grid-column: 1 / -1; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--graphite); margin-bottom: 14px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cal-legend .sw { display: inline-block; width: 18px; height: 12px; border: 1px solid var(--ink); }
.cal-legend .sw.dot { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--mangrove); }
.cal-row { position: relative; }
.cal-row + .cal-row { margin-top: 22px; }
.cal-lane { position: relative; height: 64px; }
.chq {
  position: absolute; bottom: 0; inset-inline-start: clamp(0px, calc(var(--x) - 42px), calc(100% - 84px));
  width: 84px; height: 56px; background: var(--paper); border: 1px solid var(--ink); padding: 6px 7px 5px;
  display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; line-height: 1.15; overflow: hidden;
}
.chq::before { content: ""; position: absolute; top: 0; inset-inline-end: 12px; width: 1px; height: 100%; background: var(--rule); transform: skewX(-20deg); }
.chq .cd { color: var(--graphite); }
.chq .ca { font-weight: 600; font-size: 12px; text-align: end; }
.chq .cs { display: block; height: 1px; background: var(--rule); }
.cal-svg { display: block; width: 100%; height: 44px; overflow: visible; }
.cal-svg path { fill: none; stroke: var(--mangrove); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.cal-months { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.cal-m { min-height: 88px; padding: 10px 8px; border-inline-start: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.cal-m:first-child { border-inline-start: 0; }
.cal-m .mn { font-weight: 600; }
.cal-m .my { color: var(--graphite); font-size: 12px; }
.cal-m .ma { margin-top: auto; font-weight: 600; color: var(--mangrove); font-size: 13px; line-height: 1.2; }
.cal-m .ma small { display: block; font-size: 11px; font-weight: 500; color: var(--graphite); }
.cal-m.is-land { background: var(--mist); }
.land-dot { position: absolute; top: -4.5px; inset-inline-start: calc(var(--x) - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--mangrove); }
.cal-cols { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 8px; }
.cal-cols h3 { font-size: 22px; margin-bottom: 10px; }

/* Year statement (maintenance, net) */
.yr { border-top: 1px solid var(--ink); }
.yr li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--rule); align-items: baseline; }
.yr li .num { font-weight: 600; text-align: end; }
.yr li.tot { border-bottom: 3px double var(--ink); font-weight: 600; font-size: 19px; }
.yr li.tot .num { font-size: 22px; }
.yr li small { display: block; color: var(--graphite); font-size: 13px; font-weight: 400; }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.media-pair .ph img { aspect-ratio: 4 / 3; }
.ticks { margin-top: 24px; border-top: 1px solid var(--rule); }
.ticks li { position: relative; padding: 12px 0; padding-inline-start: 26px; border-bottom: 1px solid var(--rule); }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 22px; width: 10px; height: 5px; border-inline-start: 2px solid var(--mangrove); border-bottom: 2px solid var(--mangrove); transform: rotate(-45deg); }
html[dir="rtl"] .ticks li::before { transform: rotate(45deg); }

/* Plans as statement rows */
.plans { grid-column: 1 / -1; border-top: 1px solid var(--ink); }
.plan { display: grid; grid-template-columns: minmax(120px, 0.7fr) minmax(0, 2fr) minmax(0, 1.2fr) minmax(120px, 0.8fr); gap: 20px; padding-block: 22px; border-bottom: 1px solid var(--rule); align-items: baseline; }
.plan h3 { font-size: 26px; margin: 0; }
.plan .rule-t { font-weight: 600; }
.plan .pf { text-align: end; }
.plan .pf .num { font-size: 26px; font-weight: 600; }
.plan .pf small { display: block; font-size: 13px; color: var(--graphite); }
.plan.is-current { background: var(--mist); padding-inline: 16px; margin-inline: -16px; }
.plans-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 16px; }
.plans-foot strong { font-weight: 600; }

.renew { margin-top: 28px; border-top: 2px solid var(--ink); padding-top: 14px; }

/* ---------- Owner's estimate ---------- */
.estimate { background: var(--mist); padding-block: 96px; }
.sec-head { max-width: 760px; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(36px, 5vw, 68px); font-weight: 560; letter-spacing: -0.03em; line-height: 1.02; margin-block: 10px 16px; }
html[lang="ar"] .sec-head h2 { letter-spacing: 0; }
.est-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; }
.est-form { padding: 4px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.est-form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
.txt-in::placeholder { color: var(--graphite); opacity: 1; }
.hint { font-size: 13px; color: var(--graphite); margin-top: -2px; }
.txt-in {
  appearance: none; width: 100%; height: 48px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper);
  padding: 0 14px; font-size: 16px; font-variant-numeric: tabular-nums;
}
.txt-in:hover { border-color: var(--graphite); }
.txt-in:focus-visible { outline: 2px solid var(--mangrove); outline-offset: 1px; border-color: var(--ink); }
.txt-in[aria-invalid="true"], .dd-btn[aria-invalid="true"] { border-color: var(--red); }
.err { font-size: 14px; color: var(--red); line-height: 1.45; }
.err:empty { display: none; }
.seg.wide { display: flex; border-radius: var(--r); }
.seg.wide label { flex: 1 1 auto; }
.seg.wide label > span { width: 100%; border-radius: 10px; }
.tenanted-only[hidden] { display: none; }
.date3 { display: grid; grid-template-columns: 0.8fr 1.4fr 1fr; gap: 8px; }

/* Custom dropdown */
.dd { position: relative; }
.dd-btn {
  width: 100%; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); padding: 0 12px 0 14px; cursor: pointer; text-align: start; font-size: 16px;
}
html[dir="rtl"] .dd-btn { padding: 0 14px 0 12px; }
.dd-btn:hover { border-color: var(--graphite); }
.dd-btn .dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .dd-val.is-empty { color: var(--graphite); }
.dd-btn svg { width: 14px; height: 14px; flex: none; transition: transform .25s var(--ease); }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline: 0; min-width: 100%; max-height: 288px; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r); padding: 6px;
}
.dd-list[hidden] { display: none; }
.dd-list:focus { outline: none; }
.dd-list li { padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.dd-list li[aria-selected="true"] { font-weight: 600; }
.dd-list li[aria-selected="true"]::after { content: ""; width: 9px; height: 5px; margin-top: 6px; border-inline-start: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); flex: none; }
.dd-list li.is-active { background: var(--mist); }

/* Results */
.est-res { background: var(--paper); border-radius: var(--r); padding: 28px; position: sticky; top: calc(var(--bar) + 20px); }
.res-stale { font-size: 14px; color: var(--red); font-weight: 500; margin-bottom: 14px; }
.res-stale[hidden] { display: none; }
.res-net { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: 18px; border-bottom: 3px double var(--ink); }
.res-net .lbl { font-size: 16px; }
.res-net .big { font-size: clamp(40px, 4.4vw, 60px); font-weight: 560; letter-spacing: -0.03em; line-height: 1; }
.res-net .alt { font-size: 17px; color: var(--graphite); width: 100%; text-align: end; }
.res-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding-block: 11px; border-bottom: 1px solid var(--rule); font-size: 15px; align-items: baseline; }
.res-rows li .num, .res-rows li .v { font-weight: 600; text-align: end; }
.res-rows li .v.out { color: var(--red); }
.res-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.est-wide { grid-column: 1 / -1; background: var(--paper); border-radius: var(--r); padding: 28px; }
.est-wide h3 { font-size: 22px; font-weight: 600; margin-bottom: 14px; }
.est-wide + .est-wide { margin-top: 0; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 10px 10px; border-bottom: 1px solid var(--rule); text-align: end; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: start; }
.tbl thead th { font-size: 13px; color: var(--graphite); font-weight: 600; border-bottom: 1px solid var(--ink); }
.tbl tbody tr:nth-child(even) { background: var(--mist); }
.tbl tfoot td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.tbl th.items { text-align: start; }
.tbl td.zero { color: var(--graphite); }
.tbl td.items { white-space: normal; text-align: start; color: var(--graphite); font-size: 13px; max-width: 360px; }
.est-two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.notes li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.notes li:first-child { padding-top: 0; }

/* ---------- Hand over the keys ---------- */
.handover { padding-block: 104px 112px; }
.ho-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.steps { border-top: 2px solid var(--ink); }
.step { border-bottom: 1px solid var(--rule); }
.step-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding-block: 18px; }
.step-no { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.step.is-done .step-no { background: var(--ink); color: var(--paper); }
.step.is-locked .step-no { border-color: var(--rule); color: var(--graphite); }
.step-head h3 { font-size: 22px; font-weight: 560; letter-spacing: -0.01em; line-height: 1.25; }
html[lang="ar"] .step-head h3 { letter-spacing: 0; }
.step.is-locked .step-head h3 { color: var(--graphite); }
.step-sum { grid-column: 2 / 3; font-size: 14px; color: var(--graphite); margin-top: -8px; padding-bottom: 14px; }
.step-body { padding: 4px 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.step-body[hidden] { display: none; }
.step-body .full { grid-column: 1 / -1; }
.step-body .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.routes { display: grid; gap: 10px; }
.route { position: relative; display: block; border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; padding-inline-start: 48px; cursor: pointer; }
.route input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.route .rt { font-weight: 600; display: block; }
.route .rd { display: block; font-size: 14px; color: var(--graphite); margin-top: 2px; }
.route::before { content: ""; position: absolute; inset-inline-start: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); }
.route:has(input:checked) { border-color: var(--ink); background: var(--mist); }
.route:has(input:checked)::before { background: var(--ink); border: 5px solid var(--mist); outline: 1px solid var(--ink); }
.route:has(input:focus-visible) { outline: 2px solid var(--mangrove); outline-offset: 2px; }
.route-extra { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.route-extra[hidden] { display: none; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; height: 48px; }
.stepper button { border: 0; background: var(--mist); font-size: 20px; font-weight: 500; cursor: pointer; }
.stepper button:hover { background: var(--rule); }
.stepper input { border: 0; text-align: center; width: 100%; font-size: 16px; font-weight: 600; background: var(--paper); appearance: none; }
.stepper input:focus-visible { outline: 2px solid var(--mangrove); outline-offset: -2px; }
.slots { display: grid; gap: 14px; }
.slot-day h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { position: relative; display: inline-flex; }
.slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.slot > span { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 4px 14px; border: 1px solid var(--rule); border-radius: var(--r); font-size: 15px; font-weight: 600; line-height: 1.2; min-width: 96px; }
.slot span small { font-size: 12px; font-weight: 400; color: var(--graphite); }
.slot input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.slot input:checked + span small { color: var(--paper); }
.slot input:focus-visible + span { outline: 2px solid var(--mangrove); outline-offset: 2px; }
.slot:hover input:not(:checked) + span { border-color: var(--ink); }
.slot-empty { font-size: 14px; color: var(--graphite); }
.ho-alert { grid-column: 1 / -1; font-size: 14px; color: var(--red); }
.ho-alert:empty { display: none; }

.receipt { position: sticky; top: calc(var(--bar) + 20px); background: var(--paper); border: 1px solid var(--ink); padding: 24px 24px 20px; }
.rc-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--ink); }
.rc-head h3 { font-size: 20px; font-weight: 600; }
.rc-head .rc-sub { font-size: 13px; color: var(--graphite); margin-top: 2px; }
.rc-head .rc-ref { font-size: 13px; text-align: end; color: var(--graphite); white-space: nowrap; }
.rc-head .rc-ref b { display: block; color: var(--ink); font-weight: 600; }
.rc-rows li { display: grid; grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.6fr); gap: 12px; padding-block: 11px; border-bottom: 1px dotted var(--rule); font-size: 14px; }
.rc-rows .k { color: var(--graphite); }
.rc-rows .v { font-weight: 500; }
.rc-rows .v.todo { color: var(--graphite); font-weight: 400; }
.rc-rows li.fresh .v { animation: fresh .6s var(--ease); }
@keyframes fresh { from { color: var(--mangrove); } to { color: var(--ink); } }
.rc-foot { font-size: 13px; color: var(--graphite); padding-top: 14px; }

/* Checklist (the receipt after sending) */
.ck-intro { font-size: 15px; padding-block: 14px; border-bottom: 1px dashed var(--ink); }
.ck-list li { display: grid; grid-template-columns: 22px 88px minmax(0, 1fr); gap: 12px; padding-block: 12px; border-bottom: 1px dotted var(--rule); align-items: start; font-size: 14px; }
.ck-box { width: 18px; height: 18px; border: 1px solid var(--ink); margin-top: 2px; }
.ck-day { font-weight: 600; }
.ck-day small { display: block; font-weight: 400; color: var(--graphite); font-size: 12px; }
.ck-what b { font-weight: 600; display: block; }
.ck-what span.d { color: var(--graphite); }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; }
.done-msg h3 { font-size: 26px; font-weight: 560; margin-bottom: 12px; }
.done-msg p + p { margin-top: 10px; }
.done-msg .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Tenants and Fees panels ---------- */
.tab-hero { padding-block: 72px 40px; }
.tab-hero h2 { font-size: clamp(38px, 5.6vw, 76px); font-weight: 560; letter-spacing: -0.03em; line-height: 1.02; margin-block: 10px 18px; max-width: 14em; }
html[lang="ar"] .tab-hero h2 { letter-spacing: 0; }
.ten-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-bottom: 96px; align-items: start; }
.ten-items > section { border-top: 2px solid var(--ink); padding-block: 22px 28px; }
.ten-items h3 { font-size: 26px; font-weight: 560; margin-bottom: 10px; }
.resp { margin-top: 14px; border-top: 1px solid var(--rule); }
.resp li { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--rule); }
.resp li b { font-weight: 600; white-space: nowrap; }
.ten-media { position: sticky; top: calc(var(--bar) + 24px); }
.fee-table-wrap { padding-bottom: 40px; }
.fee-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.fee-tbl th, .fee-tbl td { padding: 14px 12px; border-bottom: 1px solid var(--rule); text-align: start; vertical-align: top; }
.fee-tbl thead th { font-size: 20px; font-weight: 600; border-bottom: 1px solid var(--ink); }
.fee-tbl tbody th { font-weight: 500; width: 34%; }
.fee-tbl tbody tr:nth-child(even) { background: var(--mist); }
.fee-tbl .yes { font-weight: 600; }
.fee-tbl .cost { color: var(--ink); }
.fee-tbl .no { color: var(--graphite); }
.fee-tbl tfoot th, .fee-tbl tfoot td { border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 600; }
.fee-tbl small { display: block; font-weight: 400; color: var(--graphite); font-size: 13px; }
.fees-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-bottom: 96px; align-items: start; }

/* ---------- Footer: credentials ---------- */
.creds { border-top: 2px solid var(--ink); padding-block: 40px 48px; font-size: 14px; }
.creds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.creds dl > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--rule); }
.creds dt { color: var(--graphite); }
.creds dd { font-weight: 500; }
.creds-name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; margin-bottom: 14px; }
.creds-name svg { width: 22px; height: 22px; }
.creds-note { margin-top: 18px; color: var(--graphite); font-size: 13px; }

/* ---------- Motion start states (non static only) ---------- */
.kit-js:not(.is-static):not(.no-motion) .sheet { opacity: 0; transform: translateY(90px); }
.kit-js:not(.is-static):not(.no-motion) .st-lines li, .kit-js:not(.is-static):not(.no-motion) .st-total, .kit-js:not(.is-static):not(.no-motion) .st-foot, .kit-js:not(.is-static):not(.no-motion) .st-hint { opacity: 0; }

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
  .sheet-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: 24px; margin-top: -280px; }
  .sheet { grid-column: 2; grid-row: 1; }
  .proof { grid-column: 1; grid-row: 1; align-self: start; margin-top: var(--py, 160px); max-width: 300px; justify-self: end; width: 100%; }
  .hero-photo { height: clamp(420px, 62vw, 640px); }
}
@media (min-width: 1240px) {
  .hero {
    grid-template-columns: minmax(var(--gut), 1fr) minmax(0, calc(var(--max) - 2 * var(--gut) - 704px)) 704px minmax(var(--gut), 1fr);
    column-gap: 0; min-height: calc(100svh - var(--bar)); min-height: max(640px, min(calc(100svh - var(--bar)), 900px));
  }
  .hero-photo { grid-column: 1 / -1; grid-row: 1; height: auto; }
  .hero-photo img { position: absolute; inset: 0; object-position: 30% 50%; }
  .hero-copy { grid-column: 2; grid-row: 1; align-self: center; padding-block: 48px 120px; padding-inline-end: 32px; }
  .hero-copy h1 { font-size: clamp(48px, 4.3vw, 72px); }
  .sheet-wrap { grid-column: 3; grid-row: 1; align-self: end; margin-top: 0; margin-bottom: -72px; grid-template-columns: 280px 400px; column-gap: 24px; padding-top: 40px; }
  .proof { max-width: none; }
  .lines { padding-top: 144px; }
}
@media (max-width: 1100px) {
  .line-body > .txt, .line-body > .media { grid-column: 1 / -1; }
  .est-grid { grid-template-columns: 1fr; }
  .est-res { position: static; }
  .ho-grid { grid-template-columns: 1fr; }
  .receipt { position: static; }
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { min-height: 520px; }
  .plan { grid-template-columns: minmax(110px, 0.6fr) minmax(0, 2fr) minmax(110px, 0.8fr); }
  .plan .rule-t { grid-column: 2; }
  .plan .pf { grid-column: 3; grid-row: 1 / span 2; }
  .ten-grid, .fees-lower { grid-template-columns: 1fr; }
  .ten-media { position: static; }
  .creds-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --bar: 56px; }
  .bar-in { flex-wrap: wrap; height: auto; gap: 0 12px; padding-block: 6px 0; }
  .mark { height: 46px; }
  .lang { margin-inline-start: auto; }
  .tabs { order: 3; width: 100%; margin: 0; border-top: 1px solid var(--rule); padding-top: 6px; }
  .tab { flex: 1 1 0; height: 44px; padding: 0 8px; }
  .tab::after { inset-inline: 8px; }
  html { scroll-padding-top: 120px; }
  .est-res, .receipt { top: auto; }
  .lines { padding-top: 64px; }
  .line { padding-bottom: 72px; }
  .line-row { grid-template-columns: minmax(0, 1fr); }
  .line-fig { grid-column: 1 / -1; text-align: end; margin-top: 10px; }
  .line-unit { grid-column: 1 / -1; }
  .line-body { gap: 28px; padding-top: 28px; }
  .panels { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scroll-padding-inline: var(--gut); }
  .panel { flex: 0 0 82%; scroll-snap-align: start; min-height: 500px; }
  .cal-cols, .est-two, .media-pair { grid-template-columns: 1fr; }
  .cal-lane { height: 56px; }
  .chq { width: 52px; height: 50px; inset-inline-start: clamp(0px, calc(var(--x) - 26px), calc(100% - 52px)); padding: 5px 4px 4px; font-size: 10px; }
  .chq .ca { font-size: 11px; text-align: start; }
  .chq::before { display: none; }
  .cal-m { min-height: 82px; padding: 8px 5px; font-size: 12px; }
  .cal-m .ma { font-size: 12px; }
  .est-res, .est-wide { padding: 20px; }
  .est-form { padding: 0; }
  .est-form { grid-template-columns: 1fr; }
  .estimate, .handover { padding-block: 72px; }
  .step-body { grid-template-columns: 1fr; }
  .route-extra { grid-template-columns: 1fr; }
  .counts { grid-template-columns: 1fr; }
  .plan { grid-template-columns: 1fr auto; gap: 8px 16px; padding-block: 18px; }
  .plan h3 { grid-column: 1; }
  .plan .pf { grid-column: 2; grid-row: 1; }
  .plan p, .plan .rule-t { grid-column: 1 / -1; }
  .fee-tbl { font-size: 13px; }
  .fee-tbl th, .fee-tbl td { padding: 10px 6px; }
  .fee-tbl thead th { font-size: 15px; }
  .fee-tbl tbody th { width: 36%; }
  .creds-grid { grid-template-columns: 1fr; }
  .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 8px 6px; }
  .tbl .items { display: none; }
}
@media (max-width: 699px) {
  .proof { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel-enter { animation: none; }
  .btn, .tab::after, .seg span, .dd-btn svg { transition: none; }
}

/* ---------- Print: the handover checklist only ---------- */
@media print {
  html.print-checklist body * { visibility: hidden !important; }
  html.print-checklist #receipt, html.print-checklist #receipt * { visibility: visible !important; }
  html.print-checklist #receipt { position: absolute !important; inset-inline-start: 0; top: 0; width: 100%; border: 1px solid #000; }
  html.print-checklist #receipt .ck-actions { display: none !important; }
  .bar { position: static; }
}
h1, h2, h3 { text-wrap: balance; }
.est-grid > *, .ho-grid > *, .line-body > *, .ten-grid > *, .fees-lower > * { min-width: 0; }
@media (max-width: 760px) {
  .seg.wide label > span { padding: 0 8px; font-size: 14px; }
  .seg label > span { padding: 0 12px; }
}
@media (min-width: 1101px) {
  .line-body > .txt.w7 { grid-column: 1 / span 7; }
  .line-body > .txt.w8 { grid-column: 1 / span 8; }
}
.h-touch { display: none; }
@media (hover: none) { .h-touch { display: inline; } .h-hover { display: none; } }
@media (max-width: 699px) {
  .hero-photo { height: clamp(340px, 96vw, 460px); }
  .sheet-wrap { margin-top: -104px; }
  .sheet { padding: 18px 16px 16px; }
  .st-line { padding-inline: 6px; }
  .st-cols { padding-inline: 6px; }
  .st-total { padding-inline: 6px; }
}
.sheet-top > span:last-child { white-space: nowrap; }
@media (max-width: 760px) {
  .tbl { font-size: 12.5px; }
  .tbl th, .tbl td { padding: 8px 3px; }
  .tbl .yp { display: none; }
  .tbl thead th { font-size: 11.5px; white-space: normal; }
}
.seg.wide { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.seg.wide label > span { padding: 0 8px; text-align: center; line-height: 1.2; }
.hero-copy h1 [data-l="ar"] { font-size: 0.94em; }
html[lang="ar"] .st-cols, html[lang="ar"] .st-line { grid-template-columns: 78px minmax(0, 1fr) auto; }
@media (min-width: 1240px) {
  html[lang="ar"] .hero-copy { padding-block: 110px 120px; }
}
.nw { white-space: nowrap; }
.chq .cd-s { display: none; }
@media (max-width: 760px) {
  html[lang="ar"] .chq .cd-l { display: none; }
  html[lang="ar"] .chq .cd-s { display: inline; }
}
h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus, #main:focus { outline: none; }
@media (max-width: 760px) {
  .receipt { padding: 18px 16px 16px; }
  .ck-list li { grid-template-columns: 20px 74px minmax(0, 1fr); gap: 10px; }
}
