:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --field-border: #86868b;
  --surface: #ffffff;
  --wash: #f5f5f7;
  --navy: #172e55;
  --blue: #0071e3;
  --link: #0066cc;
  --blue-tint: #e8f2fc;
  --blue-tint-soft: #f0f6fd;
  --cyan: #0891b2;
  --violet: #7c3aed;
  --orange: #ea580c;
  --r-control: 10px;
  --r-group: 14px;
  --r-card: 20px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
  --shadow-menu: 0 12px 32px rgba(0,0,0,.12);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--wash); scroll-padding-top: calc(var(--header-height, 72px) + 12px); }
body { margin: 0; color: var(--ink); background: var(--wash); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
/* A single long word in a heading ("snapshot" in capitals at 200% text) breaks instead of widening the page. */
h1, h2, h3, h4 { overflow-wrap: break-word; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.site-header { position: sticky; inset-block-start: 0; z-index: 50; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
/* The header stays .94 white so nav text stays readable over a dark card scrolling under it; it turns opaque without blur support or when less transparency is requested. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header { background: #fff; } }
@media (prefers-reduced-transparency: reduce) { .site-header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* A header taller than a quarter of the window (200% text in a narrow window) scrolls away with the page instead of covering that share of every view; syncHeaderOffset in statso-nav.js sets the class and zeroes --header-height. relative, not static: it keeps the z-index, so the open menus stay above later positioned content. */
.site-header.is-tall { position: relative; }
.header-inner, footer .shell { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-inner { flex-wrap: wrap; row-gap: 4px; padding-block: 4px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; align-self: stretch; gap: 5px; }
.nav-item { display: grid; place-items: center; min-width: 44px; min-height: 42px; padding: 8px 13px; border-radius: var(--r-control); color: var(--muted); text-decoration: none; font-weight: 750; }
/* Hover styling is for a real mouse only (README): each :hover rule is wrapped where it stands, so the cascade order is unchanged. */
@media (hover: hover) and (pointer: fine) { .nav-item:hover { color: var(--navy); background: var(--blue-tint-soft); } }
.nav-item[aria-current="page"] { position: relative; color: var(--link); background: var(--blue-tint); }
.nav-item[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 12px; inset-block-end: 4px; height: 2px; border-radius: 999px; background: currentColor; }
/* A focused item paints above its neighbours: the current item is position: relative (for its bar), and without this the 3px focus ring of a neighbour is covered on the side that faces it. */
.nav-item:focus-visible { position: relative; z-index: 1; }
.nav-home svg { width: 21px; height: 21px; fill: currentColor; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--navy); text-decoration: none; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 28%; color: white; background: linear-gradient(145deg, var(--blue), var(--cyan)); font-family: Georgia, serif; }
.hero { padding: 58px 0 34px; }
.hero h1 { margin: 3px 0 8px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.1; letter-spacing: -.03em; }
html[lang="he"] .hero h1 { letter-spacing: -.02em; }
.hero > p:last-child { margin: 0; color: var(--muted); font-size: 1.08rem; }
.eyebrow { margin: 0; color: var(--link); font-size: .77rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
html[lang="he"] .eyebrow { letter-spacing: 0; }
.kpi-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.kpi-grid > .kpi-card { flex: 1 1 max(12.5rem, calc(25% - 11px)); min-width: 0; }
.kpi-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.kpi-card { position: relative; min-height: 168px; padding: 24px; }
.kpi-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--r-card) var(--r-card) 0 0; background: var(--accent); }
.accent-blue { --accent: var(--blue); }.accent-cyan { --accent: var(--cyan); }.accent-violet { --accent: var(--violet); }.accent-orange { --accent: var(--orange); }
.kpi-label { display: block; margin: 0 0 20px; color: var(--muted); font-size: .89rem; font-weight: 400; line-height: inherit; }
.kpi-value, .kpi-date { display: block; overflow-wrap: anywhere; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -.025em; }
html[lang="he"] .kpi-value, html[lang="he"] .kpi-date { letter-spacing: -.015em; }
.kpi-date { font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
.kpi-meta { display: block; color: var(--muted); margin-top: 8px; font-size: .82rem; }
.kpi-meta + .kpi-meta { margin-top: 3px; font-size: .75rem; white-space: nowrap; }
.kpi-pair { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; }
.kpi-pair > div { flex: 1 1 4.5rem; min-width: 0; }
.kpi-pair .kpi-value { font-size: clamp(1.3rem, 2.1vw, 1.75rem); }
.kpi-pair .kpi-meta { margin-top: 7px; font-size: .78rem; }
.kpi-footnote { display: block; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.kpi-footnote strong { color: var(--navy); font-weight: 600; }
.kpi-brand { display: grid; place-items: center; min-height: 122px; }
.kpi-brand .brand { font-size: 1.5rem; }
.kpi-brand .brand-mark { width: 38px; height: 38px; border-radius: 28%; font-size: 1.2rem; }
[dir="ltr"], .numeric { direction: ltr; unicode-bidi: isolate; }
.panel { padding: clamp(20px, 3vw, 32px); margin: 18px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 3px 0 0; font-size: clamp(1.35rem, 2.5vw, 1.85rem); letter-spacing: -.02em; }
.range-controls { display: flex; flex-wrap: wrap; gap: 12px; }
.range-group { display: flex; flex-wrap: wrap; gap: 12px; }
label { color: #424245; font-size: .86rem; font-weight: 600; }
input, select, textarea { border: 1px solid var(--field-border); border-radius: var(--r-control); color: var(--ink); background: white; padding: 9px 11px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
.range-controls select { margin-inline-start: 5px; }
.chart-wrap { position: relative; height: 370px; direction: ltr; }
/* shown on every page when part of the data could not be loaded, so a deep link to a tool is not left silent */
.data-problem-wrap { margin-block: 14px 0; }
.data-problem { padding: 12px 16px; border: 1px solid #b42318; border-inline-start-width: 5px; border-radius: var(--r-group); color: #7a1b12; background: #fff5f3; font-size: .95rem; }
.data-problem p { margin: 0 0 6px; }
.data-problem ul { margin: 0; padding-inline-start: 1.25rem; }
.inline-error { min-height: 1.5em; margin: 0 0 10px; color: #b42318; font-size: .9rem; }
.calc-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; }
.calc-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.calc-form .wide { grid-column: 1 / -1; }
.calc-form label { display: grid; gap: 7px; }
.calc-form input:not([type="radio"]), .calc-form select { min-width: 0; width: 100%; }
.calc-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.calc-form fieldset label { display: flex; align-items: center; gap: 7px; }
.calc-form legend { float: right; margin-inline-end: 22px; color: #424245; font-size: .86rem; font-weight: 700; }
.date-group { padding: 16px; background: var(--wash); border-radius: var(--r-group); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.date-group > span { grid-column: 1 / -1; font-weight: 750; }
.calc-output { background: var(--navy); color: white; border-radius: var(--r-group); padding: 24px; }
.calc-output .inline-error { color: #fecaca; }
.section-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: start; max-width: 100%; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .section-toggle:hover .toggle-caret { border-color: var(--blue); color: var(--link); } }
.toggle-caret { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border: 1px solid var(--line); border-radius: 28%; color: var(--muted); font-size: .7rem; transition: transform .15s ease; }
.toggle-caret::before { content: "\25BC"; content: "\25BC" / ""; }
[data-collapsed="true"] .toggle-caret { transform: rotate(90deg); }
[data-collapsed="true"] .range-controls { display: none; }
.table-wrap { overflow-x: auto; scroll-padding-inline: 12px; }
/* Only the read-only data tables are height-bounded, with a sticky header. The rent tool's period tables (.rent-scroll) are named regions too, for their own keyboard stop, but scroll sideways only, at full height. */
.table-wrap[role="region"]:not(.rent-scroll) { max-height: min(70vh, 640px); overflow: auto; scroll-padding-top: 3rem; scroll-padding-bottom: 12px; }
.table-wrap[role="region"]:not(.rent-scroll) thead th { position: sticky; top: 0; z-index: 1; background: var(--wash); box-shadow: inset 0 -1px 0 var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
html[dir="rtl"] .data-table td[dir="ltr"] { text-align: right; }
html[dir="rtl"] .kpi-value[dir="ltr"], html[dir="rtl"] .kpi-meta[dir="ltr"] { text-align: right; }
.data-table thead th { color: var(--muted); font-size: .8rem; font-weight: 700; }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody th { font-weight: 700; }
.data-table td { font-size: .94rem; }
.data-table .currency-code { color: var(--muted); font-size: .78rem; margin-inline-start: 6px; }
html[dir="rtl"] .data-table .col-group-start { border-right: 2px solid var(--line); }
html[dir="ltr"] .data-table .col-group-start { border-left: 2px solid var(--line); }
.table-note { margin: 14px 0 0; color: var(--muted); font-size: .8rem; }
.calc-result span { color: #d2d2d7; font-size: .86rem; display: block; }
.calc-result strong { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: 2rem; margin: 3px 0; }
.calc-result small { margin-inline-start: 5px; color: #d2d2d7; }
.calc-result hr { border: 0; border-top: 1px solid rgba(255,255,255,.18); margin: 18px 0; }
.calc-note { color: #d2d2d7; font-size: .82rem; line-height: 1.55; }
.kpi-footnote-sub { display: block; margin-top: 3px; font-size: .72rem; line-height: 1.5; }

/* --- tools tab ---------------------------------------------------------- */
.nav-group { position: relative; display: flex; }
.nav-submenu { position: absolute; inset-block-start: 100%; inset-inline-end: 0; z-index: 40; min-width: 210px; margin: 0; padding: 7px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-group); box-shadow: var(--shadow-menu); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .12s, transform .12s, visibility .12s; }
@media (hover: hover) and (pointer: fine) { .nav-group:hover .nav-submenu { opacity: 1; visibility: visible; transform: translateY(0); } }
.nav-submenu a { display: block; padding: 9px 12px; border-radius: var(--r-control); color: var(--navy); text-decoration: none; font-size: .9rem; font-weight: 650; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .nav-submenu a:hover { background: var(--blue-tint-soft); color: var(--link); } }
.brand-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.lang-picker { position: relative; }
.lang-button { padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); color: var(--muted); font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; max-width: 100%; }
@media (hover: hover) and (pointer: fine) { .lang-button:hover { border-color: var(--blue); color: var(--link); background: var(--blue-tint-soft); } }
.lang-menu { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-start: 0; z-index: 60; min-width: 148px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-group); box-shadow: var(--shadow-menu); }
.lang-choice { display: block; width: 100%; padding: 8px 11px; border: 0; border-radius: var(--r-control); background: none; color: var(--navy); font: inherit; font-size: .89rem; font-weight: 650; text-align: start; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .lang-choice:hover { background: var(--blue-tint-soft); color: var(--link); } }
.lang-choice[aria-current="true"] { background: var(--blue-tint); color: var(--link); }
.lang-choice:not([aria-current="true"]) .lang-tick { display: none; }
.tools-hero { padding-bottom: 22px; }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin-bottom: 20px; }
.tool-card { display: grid; align-content: start; gap: 7px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); color: var(--navy); text-decoration: none; transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .tool-card:hover { border-color: var(--blue); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.10); } }
.tool-card-mark { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 6px; border-radius: 28%; color: white; background: linear-gradient(145deg, var(--blue), var(--cyan)); font-size: 1.15rem; font-weight: 700; }
.tool-card strong { font-size: 1.05rem; }
.tool-card span:last-child { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.tool-page { padding: 28px; margin-bottom: 18px; }
.tool-back { display: inline-flex; align-items: center; gap: .35em; min-height: 24px; color: var(--muted); text-decoration: none; font-size: .87rem; font-weight: 650; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .tool-back:hover { color: var(--link); } }
.tool-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn-ghost { padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); color: var(--navy); font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover:not(:disabled) { border-color: var(--blue); color: var(--link); background: var(--blue-tint-soft); } }
.btn-ghost:disabled { opacity: .6; cursor: default; }
.btn-copy { border-color: var(--blue); color: var(--link); }

/* --- rent tool ---------------------------------------------------------- */
.rent-form { display: grid; gap: 16px; }
.rent-block { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-group); padding: 16px 20px; margin: 0; }
.rent-block legend { padding-inline: 8px; color: #424245; font-size: .86rem; font-weight: 700; }
.rent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.rent-grid label, .rent-option label { display: grid; gap: 6px; font-size: .88rem; min-width: 0; }
.rent-grid input, .rent-grid select, .rent-option input { width: 100%; min-width: 0; }
.rent-inline { display: flex; align-items: center; gap: 8px; font-size: .89rem; margin-block: 4px; }
.rent-option { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rent-option .tr-opt-remove { justify-self: start; }
.rent-hint { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
#tr-options-month-hint { margin-bottom: 10px; }
.rent-form input[aria-invalid="true"], #tr-output input[aria-invalid="true"] { border-color: #b42318; }
.rent-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: 12px; margin-bottom: 20px; }
.rent-summary-grid > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-group); }
.rent-summary-grid span { display: block; color: var(--muted); font-size: .8rem; }
.rent-summary-grid strong { display: block; margin-top: 4px; font-size: 1.3rem; overflow-wrap: anywhere; }
.rent-summary-highlight { border-color: var(--blue); background: var(--blue-tint-soft); }
.rent-summary-highlight span { color: #424245; }
.rent-period { margin-bottom: 22px; }
.rent-period-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 10px; }
.rent-period-head h3 { margin: 0; font-size: 1.02rem; }
.rent-period-head > span { color: var(--muted); font-size: .84rem; }
.rent-mark-all { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; color: var(--muted); font-size: .82rem; }
.rent-table td, .rent-table th { padding: 7px 10px; font-size: .87rem; }
.rent-table input[type="number"] { width: 96px; padding: 5px 7px; font-size: .87rem; }
.rent-table tfoot th, .rent-table tfoot td { border-top: 2px solid var(--line); font-weight: 700; }
.rent-row-pending td { color: var(--muted); font-style: italic; }
.rent-negative { color: #b42318; }
.fxh-currencies, .tool-checkboxes { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.fxh-currency, .tool-checkbox { display: flex; align-items: center; gap: 7px; font-size: .88rem; max-width: 100%; overflow-wrap: anywhere; }
.fxh-currency .currency-code { flex-shrink: 0; }
.fxh-bulk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.fxh-bulk-actions .btn-ghost { min-height: 24px; }

/* --- print / PDF export -------------------------------------------------- */
#print-root { display: none; }
body.is-printing > *:not(#print-root) { display: none !important; }
body.is-printing #print-root { display: block; }
.print-head { border-bottom: 2px solid #1e293b; padding-bottom: 10px; margin-bottom: 18px; }
.print-brand { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.print-head h1 { margin: 6px 0 2px; font-size: 1.5rem; }
.print-subtitle { margin: 0; color: #475569; font-size: .92rem; }
#print-root h2 { margin: 20px 0 8px; font-size: 1.05rem; }
#print-root table { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: .82rem; }
#print-root th, #print-root td { padding: 6px 9px; border: 1px solid #cbd5e1; text-align: start; }
#print-root thead th { background: #e8f0ff; font-weight: 700; }
.print-total { margin: 16px 0 4px; font-size: 1.05rem; }
.print-note { color: #475569; font-size: .82rem; line-height: 1.6; }
.print-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid #cbd5e1; color: #64748b; font-size: .75rem; }
@media print { @page { margin: 14mm; } body { background: white; } #print-root { display: block; } .print-head { break-after: avoid; } #print-root tr { break-inside: avoid; } .table-wrap[role="region"]:not(.rent-scroll) { max-height: none; overflow: visible; } .table-wrap[role="region"]:not(.rent-scroll) thead th { position: static; box-shadow: none; } }
.search-label { display: grid; gap: 5px; min-width: min(290px, 100%); }
.table-summary { color: var(--muted); font-size: .84rem; }
.table-scroll { overflow: auto; max-height: 540px; border: 1px solid var(--line); border-radius: var(--r-group); scroll-padding: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { background: var(--wash); text-align: right; color: #424245; }
th, td { padding: 11px 15px; border-bottom: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { tbody tr:hover { background: #fafafc; } }
td.numeric { text-align: left; font-variant-numeric: tabular-nums; }
footer { margin-top: 42px; background: transparent; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.footer-inner { padding-block: 14px; }
.footer-meta { display: flex; align-items: center; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-links a:hover { color: var(--link); text-decoration: underline; } }
.state-loading, .state-error, .state-ready { display: none; }
[data-state="loading"] > .state-loading, [data-state="error"] > .state-error, [data-state="ready"] > .state-ready { display: block; }
.kpi-card[data-state="loading"] .state-loading, .kpi-card[data-state="error"] .state-error, .kpi-card[data-state="ready"] .state-ready { display: block; }
.kpi-card[data-state="ready"] { display: flex; flex-direction: column; }
.kpi-card[data-state="ready"] .state-ready { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.panel[data-collapsed="true"] > .state-loading, .panel[data-collapsed="true"] > .state-error,
.panel[data-collapsed="true"] > .state-ready { display: none; }
.panel[data-collapsed="true"] .section-heading { margin-bottom: 0; }
.state-loading { color: var(--muted); }
.state-error { color: #b42318; }

.guides-view { min-height: 70vh; }
.guide-hero { padding: 58px 0 30px; }
.guide-hero h1, .guide-header h1 { margin: 3px 0 8px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -.025em; }
html[lang="he"] .guide-hero h1, html[lang="he"] .guide-header h1 { letter-spacing: -.015em; }
.guide-hero > p:last-child, .guide-header > p:last-child { margin: 0; color: var(--muted); }
.guide-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.guide-card { text-decoration: none; position: relative; display: grid; gap: 10px; min-height: 170px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-card); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-card); text-align: right; cursor: pointer; transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .guide-card:hover { border-color: #99c6f4; transform: translateY(-1px); } }
.guide-card span { font-size: 1.25rem; font-weight: 800; }
.guide-card small { max-width: 48ch; color: var(--muted); font-size: .9rem; }
.guide-card b { position: absolute; inset-inline-end: 24px; bottom: 18px; color: var(--link); font-size: 1.35rem; }
.guide-detail { padding-top: 28px; }
.guide-back { display: inline-block; padding: 7px 0; color: var(--link); font-weight: 750; text-decoration: none; }
.guide-header { padding: 30px 0 22px; }
.guide-selectors { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; margin-bottom: 22px; }
.guide-selectors fieldset { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-group); background: var(--surface); }
.guide-selectors legend { padding: 0 6px; color: var(--navy); font-weight: 800; }
.radio-options { display: grid; gap: 9px; }
.radio-options label { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.radio-options input { flex: 0 0 auto; margin-top: 3px; }
.guide-note, .guide-notice { margin: 20px 0; padding: 18px 20px; border: 1px solid #bae6fd; border-inline-start: 4px solid var(--cyan); border-radius: var(--r-group); background: #ecfeff; }
.guide-notice { border-color: #fed7aa; border-inline-start-color: var(--orange); background: #fff7ed; }
.guide-notice h2 { margin: 0 0 5px; font-size: 1.2rem; }
.guide-notice p { margin: 0 0 14px; }
.guide-notice button, .copy-url { border: 0; border-radius: var(--r-control); color: white; background: var(--blue); padding: 8px 13px; cursor: pointer; font-weight: 750; }
.guide-mcode-cta { margin: 16px 0 22px; }
.guide-mcode-button { display: inline-block; border-radius: var(--r-control); color: white; background: var(--blue); padding: 11px 18px; font-weight: 750; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .guide-mcode-button:hover { background: var(--navy); } }
/* Quiet, Apple-style guide buttons: a thin outline pill, never the solid blue one. */
.guide-pill { display: inline-block; padding: 2px 10px; border: 1px solid #d2d2d7; border-radius: 999px; background: #fafafc; color: var(--navy); font: inherit; font-size: .93em; font-weight: 650; line-height: 1.55; text-decoration: none; max-width: 100%; }
@media (hover: hover) and (pointer: fine) { .guide-pill:hover { border-color: var(--blue); color: var(--link); background: var(--blue-tint-soft); } }
.guide-copy-pill.copy-url { display: inline-block; margin-bottom: 8px; padding: 6px 15px; border: 1px solid #d2d2d7; border-radius: 999px; color: var(--navy); background: #fafafc; font-weight: 650; }
@media (hover: hover) and (pointer: fine) { .guide-copy-pill.copy-url:hover { border-color: var(--blue); color: var(--link); background: var(--blue-tint-soft); } }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: guide-step; }
.guide-steps > li { margin: 18px 0; padding: clamp(18px,3vw,28px); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-card); }
.step-copy h2 { margin: 0; color: var(--link); font-size: 1.1rem; }
.step-copy p { margin: 7px 0 15px; }
.url-block { display: flex; align-items: stretch; max-width: 100%; margin: 12px 0 18px; direction: ltr; }
.url-block code { min-width: 0; flex: 1; padding: 10px 12px; overflow-wrap: anywhere; border: 1px solid #c7c7cc; border-radius: var(--r-control) 0 0 var(--r-control); color: #333336; background: #fafafc; font-size: .78rem; }
.url-block .copy-url { flex: 0 0 auto; border-radius: 0 var(--r-control) var(--r-control) 0; }
.step-art { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; direction: rtl; }
.step-art-single { grid-template-columns: minmax(0, 560px); }
.step-art figure { min-width: 0; margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: var(--r-group); background: #fafafc; }
.art-scroll { max-width: 100%; overflow-x: auto; scroll-padding-inline: 12px; }
.art-scroll-rtl { direction: rtl; }
.art-scroll-ltr { direction: ltr; }
.guide-svg, .step-art img, .guide-real-shot { display: block; width: 100%; min-width: 470px; height: auto; }
.guide-real-shot { position: relative; }
.guide-shot-arrow { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.step-art figcaption { padding-top: 7px; color: var(--muted); text-align: center; font-size: .78rem; font-weight: 700; }
.prose-guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; overflow-wrap: anywhere; }
.prose-guide > section { padding: clamp(20px,3vw,30px); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-card); }
.prose-guide h2 { margin: 0 0 12px; color: var(--navy); font-size: 1.35rem; }
.prose-guide h3 { margin: 0 0 5px; font-size: 1.05rem; }
.prose-guide p { max-width: 78ch; line-height: 1.75; }
.info-view { min-height: 70vh; }
.info-page { padding-top: 48px; }
.info-header h1 { margin: 0 0 24px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -.025em; }
html[lang="he"] .info-header h1 { letter-spacing: -.015em; }
.info-page .prose-guide p:first-child { margin-top: 0; }
.info-page .prose-guide p:last-child { margin-bottom: 0; }
.info-page a { overflow-wrap: anywhere; }
.info-list { max-width: 78ch; margin: 6px 0 18px; padding-inline-start: 24px; line-height: 1.75; }
.info-list li { margin: 6px 0; }
.info-page .prose-guide .info-list:last-child { margin-bottom: 0; }
.source-list { margin: 0; padding-inline-start: 24px; }
.source-list li { margin: 10px 0; line-height: 1.7; }
.info-back { display: inline-block; margin-top: 22px; color: var(--link); font-weight: 750; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .info-back:hover { text-decoration: underline; } }
.contact-form { display: grid; gap: 18px; width: min(100%, 650px); }
.contact-required { margin: 0; color: var(--muted); font-size: .86rem; }
.contact-field { display: grid; gap: 6px; min-width: 0; }
.contact-field input, .contact-field textarea { width: 100%; min-height: 46px; }
.contact-field textarea { min-height: 150px; resize: vertical; }
.contact-field [aria-invalid="true"] { border-color: #b42318; }
.contact-field-meta { display: flex; align-items: start; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .82rem; }
.field-error, .contact-status { margin: 0; color: #b42318; font-size: .86rem; }
.field-error:empty, .contact-status:empty { display: none; }
.contact-status { padding: 11px 13px; border: 1px solid #fecaca; border-radius: var(--r-group); background: #fef2f2; }
.contact-submit { justify-self: start; min-width: 92px; min-height: 46px; padding: 10px 20px; border: 0; border-radius: var(--r-control); color: white; background: var(--blue); font-weight: 750; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .contact-submit:hover { background: #0058b9; } }
.contact-submit[aria-disabled="true"] { opacity: .68; cursor: wait; }
.contact-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.contact-success { margin: 0; color: var(--navy); font-weight: 700; line-height: 1.75; }
.live-example p { margin: 0; }
.timeline-figure { max-width: 760px; margin: 24px auto 0; padding: 9px; border: 1px solid var(--line); border-radius: var(--r-group); background: #fafafc; }
.timeline-figure figcaption { padding-top: 7px; color: var(--muted); text-align: center; font-size: .82rem; font-weight: 700; }

@media (max-width: 900px) { .kpi-grid > .kpi-card { flex-basis: max(12.5rem, calc(50% - 8px)); } .calc-layout, .tool-layout { grid-template-columns: 1fr; } .guide-selectors { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .step-art, .guide-cards { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .mcode-view .mcode-form { grid-template-columns: 1fr; } .site-nav .nav-item-stacked { width: 7rem; font-size: .75rem; padding-inline: 6px; } .shell .code-block pre { padding: 10px; } .mcode-view .mcode-output { margin-block: 14px; } .header-inner { padding-block: 8px; } .guide-card-soon { min-height: 140px; } .shell { width: min(100% - 22px, 1180px); } .header-inner { gap: 12px; } .brand { font-size: 1.08rem; } .nav-item { padding-inline: 10px; } .hero, .guide-hero { padding-top: 38px; } .kpi-grid > .kpi-card { flex-basis: 100%; } .section-heading { align-items: stretch; flex-direction: column; } .range-controls { justify-content: space-between; } .calc-form { grid-template-columns: minmax(0, 1fr); } .date-group { grid-column: 1; } .guide-svg, .step-art img, .guide-real-shot { min-width: 430px; } footer .shell { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 16px; gap: 12px; } .footer-meta { width: 100%; flex-wrap: wrap; gap: 8px 16px; } .footer-links { justify-content: flex-start; gap: 6px; } }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.skip-link { position: fixed; inset-block-start: 12px; inset-inline-start: 50%; transform: translate(-50%, -140%); z-index: 100; padding: 10px 20px; border: 0; border-radius: var(--r-control); background: var(--blue); color: #fff; font: inherit; font-weight: 750; cursor: pointer; transition: transform .15s ease; }
.skip-link:focus { transform: translate(-50%, 0); }
.noscript-notice { padding: 12px 16px; border-bottom: 1px solid #fed7aa; background: #fff7ed; color: var(--ink); text-align: center; font-weight: 650; line-height: 1.6; }
.noscript-notice p { max-width: 78ch; margin: 0 auto; }
.noscript-notice p + p { margin-top: 4px; }

.result-disclaimer { margin: 14px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.calc-output .result-disclaimer { color: #d2d2d7; }

.contact-disclosure { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.contact-disclosure a { color: var(--link); }

.chart-alt { margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.chart-alt a { color: var(--link); }
.chart-series { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.chart-series legend { margin-bottom: 8px; padding: 0; color: #424245; font-size: .86rem; font-weight: 700; }
.chart-month { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 0 0; }
.chart-month-track { flex: 1 1 240px; min-width: 0; display: flex; }
.chart-month input[type="range"] { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 24px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; accent-color: var(--blue); cursor: pointer; }

.nav-group[data-open="true"] .nav-submenu { opacity: 1; visibility: visible; transform: translateY(0); }
/* Escape closes the menu but returns focus to the trigger, which sits inside
   .nav-group and is itself what opens the menu (see statso-nav.js) — without
   this, focusing the trigger again would reopen it immediately. */
.nav-group[data-closed="true"] .nav-submenu { opacity: 0 !important; visibility: hidden !important; transform: translateY(-4px) !important; }

footer .footer-legal { display: block; min-height: 0; padding-block: 14px; border-top: 1px solid var(--line); }
.footer-legal p { margin: 0 0 8px; line-height: 1.5; }
.footer-legal p:last-child { margin-bottom: 0; }

/* One keyboard-focus ring for every operable control. The white halo keeps it
   visible on dark surfaces too; tabindex="-1" is excluded because that is a
   heading the router moves focus to, not something the visitor operates. */
:is(a, button, summary, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

@media (prefers-reduced-motion: reduce) {
  .toggle-caret, .nav-submenu, .skip-link, .tool-card, .guide-card { transition: none; }
}

/* iOS zooms the page into a focused text field whose font is under 16px. On touch screens every text field is at least 16px;
   a rule that sets a field's font-size elsewhere is repeated here, after it. The desktop look is unchanged. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea, .rent-table input[type="number"] { font-size: max(16px, 1rem); }
}

/* A 320px window with a classic 15px scrollbar leaves ~305px: tighten the nav so its four items still fit. */
@media (max-width: 360px) { .site-nav { gap: 3px; } .nav-item { min-width: 38px; padding-inline: 7px; } }
/* A 305px window leaves 290px beside a classic scrollbar; the longer English labels need these last pixels. */
@media (max-width: 319px) { .site-nav { gap: 2px; } .nav-item { padding-inline: 5px; } .site-nav .nav-item-stacked { width: 6.5rem; } }

/* Power Query code exports */
.nav-item-stacked { width: 8rem; white-space: normal; text-align: center; font-size: .82rem; line-height: 1.2; }
.guide-card-soon { border-style: dashed; background: var(--wash); cursor: default; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .guide-card-soon:hover { border-color: var(--line); transform: none; } }
.code-block { min-width: 0; max-width: 100%; margin: 12px 0 18px; }
.code-block pre { direction: ltr; text-align: left; overflow-x: auto; scroll-padding-inline: 12px; margin: 0 0 10px; padding: 16px; border: 1px solid #c7c7cc; border-radius: var(--r-control); color: #333336; background: #fafafc; }
.code-block code { font: .78rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.mcode-view { min-height: 70vh; }
.mcode-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mcode-form fieldset { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-group); background: var(--surface); }
.mcode-form legend { padding-inline: 6px; color: var(--navy); font-weight: 800; }
.mcode-form .rent-inline { margin-top: 16px; }
.mcode-output { margin-block: 20px; }
#mc-error { color: #b42318; }
#mc-copy { border: 0; border-radius: var(--r-control); color: white; background: var(--blue); padding: 8px 13px; cursor: pointer; font-weight: 750; }
#mc-copy:disabled { opacity: .6; cursor: default; }

/* last in the file on purpose: these overrides must win over the rules above that set border: 0 */
@media (forced-colors: active) {
  .nav-item[aria-current="page"] { border-block-end: 3px solid CanvasText; }
  .nav-item[aria-current="page"]::after { display: none; }
  /* these buttons are a coloured fill with no border; without the fill they would read as plain text */
  .contact-submit, #mc-copy, .guide-notice button, .copy-url, .skip-link { border: 1px solid ButtonText; }
}
