@font-face {
  font-family: "Assistant";
  src: url("/fonts/Assistant-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #8cc540;
  --brand-dark: #5f8a24;
  --teal: #007a9e;
  --teal-soft: #e6f6fb;
  --ink: #2e3233;
  --muted: #5c6366;
  --bg: #f3f6f2;
  --paper: #ffffff;
  --line: #d9e0d4;
  --down: #1f6b2a;
  --down-soft: #e5f5e3;
  --up: #9f1d1d;
  --up-soft: #fdecec;
  --flat: #5c6366;
  --shadow: 0 8px 24px rgba(46, 50, 51, 0.08);
  --header: #1d3a12;
  --radius: 14px;
  --max: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Assistant", "Arial Hebrew", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal);
}

.skip {
  position: absolute;
  right: 12px;
  top: -40px;
  background: var(--header);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background: var(--header);
  color: #fff;
  padding: 20px 16px 24px;
  border-bottom: 6px solid var(--brand);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.logo-link {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  flex: none;
}

.logo-link img {
  display: block;
  width: 168px;
  height: auto;
}

.header-text {
  flex: 1;
  min-width: 200px;
}

.site-header h1 {
  margin: 0;
  /* כותרת מוגדלת (בקשת יניב, 17.11): גדלה עם רוחב המסך, ונשארת בשורה אחת גם במסך צר */
  font-size: clamp(1.75rem, 8vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.fetch-stamp {
  margin: 6px 0 0;
  font-size: 14px;
  color: #dce8d4;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.guide {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
}

.index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
}

.index-tile {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 10px 12px 10px 10px;
  padding-inline-start: 12px;
  padding-inline-end: 34px;
  text-align: right;
  cursor: pointer;
  box-shadow: var(--shadow);
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.index-tile:hover,
.index-tile:focus-visible {
  border-color: var(--brand-dark);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.index-tile[aria-pressed="true"] {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0, 122, 158, 0.25), var(--shadow);
}

.index-tile .tile-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.index-tile .tile-title {
  font-weight: 800;
  font-size: clamp(13px, 9cqi, 15px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.index-tile .tile-num {
  font-size: clamp(1.15rem, 14cqi, 1.55rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.index-tile .tile-num.is-drop {
  color: var(--down);
}
.index-tile .tile-num.is-rise {
  color: var(--up);
}
.index-tile .tile-num.is-steady {
  color: var(--flat);
}

.index-tile .tile-extra,
.index-tile .when,
.index-tile .tile-period {
  font-size: clamp(11px, 7.5cqi, 13px);
  line-height: 1.3;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.calc-open {
  width: 100%;
  margin: 0;
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
  text-align: right;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.calc-open-kicker,
.calc-open-title,
.calc-open-hint {
  grid-column: 1;
}

.calc-open-kicker {
  font-size: 12px;
  font-weight: 650;
  opacity: 0.9;
}

.calc-open-hint {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 650;
  opacity: 0.95;
}

.calc-open-chevron {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 28px;
  height: 28px;
  color: #fff;
  transition: transform 0.2s ease;
  transform: rotate(0deg);
}

.calc-open[aria-expanded="true"] .calc-open-chevron {
  transform: rotate(180deg);
}

.calc-open:hover,
.calc-open:focus-visible {
  background: #006280;
  box-shadow: 0 0 0 2px rgba(0, 122, 158, 0.35), var(--shadow);
  outline: 2px solid var(--header);
  outline-offset: 2px;
}

.detail-pane {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.pane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pane-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.pane-meta,
.pane-next,
.pane-source,
.trend-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.icon-btn:focus-visible,
.icon-btn:hover {
  border-color: var(--teal);
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.trend-wrap {
  margin-top: 12px;
}

.trend-svg {
  width: 100%;
  height: auto;
  display: block;
  background: linear-gradient(#f8faf6, #fff);
  border-radius: 10px;
}

.changes {
  margin: 4px 0 20px;
}

.changes h2,
.glossary h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.changes ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.changes li {
  background: var(--paper);
  border-radius: var(--radius);
  border-right: 5px solid var(--brand);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.changes li h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.changes li p {
  margin: 0;
  color: var(--muted);
}

.refinance {
  margin-top: 20px;
  text-align: center;
}

.refinance-btn {
  display: inline-block;
  background: var(--header);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
}

.refinance-btn:hover,
.refinance-btn:focus-visible {
  background: var(--brand-dark);
  outline: 2px solid var(--header);
  outline-offset: 3px;
}

.placeholder-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.glossary {
  margin-top: 28px;
}


.gloss {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 8px;
}

.gloss summary {
  cursor: pointer;
  font-weight: 800;
  padding: 12px 0;
}

.gloss .gloss-body {
  padding: 0 0 14px;
  color: var(--muted);
}

.gloss .gloss-body p {
  margin: 0 0 8px;
}

.prime-eq {
  background: var(--teal-soft);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 700;
  margin: 8px 0;
}

.site-footer {
  background: #16260e;
  color: #dce8d4;
  padding: 24px 16px 32px;
}

.site-footer a {
  color: #fff;
}

.disclaimer,
.footer-meta {
  max-width: var(--max);
  margin: 0 auto 12px;
  font-size: 14px;
}

.footer-meta {
  margin-bottom: 0;
}

.dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dialog-layer[hidden] {
  display: none !important;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 38, 14, 0.5);
}

.dialog-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow: auto;
  background: var(--paper);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(22, 38, 14, 0.2);
}

.calc-form {
  display: grid;
  gap: 14px;
}

.field label,
fieldset legend {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.field input {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.field input:focus {
  outline: 2px solid var(--teal);
  border-color: var(--teal);
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.choice-row button {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 4px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.choice-row button[aria-checked="true"] {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.calc-res {
  display: grid;
  gap: 8px;
}

.calc-res > div {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.calc-res .headline-num {
  background: var(--teal-soft);
  font-size: 1.15rem;
  font-weight: 800;
}

.calc-res .headline-num.is-drop {
  background: var(--down-soft);
  color: var(--down);
}
.calc-res .headline-num.is-rise {
  background: var(--up-soft);
  color: var(--up);
}

.calc-hint,
.lead-line {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.status {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--header);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 30;
}

@media (min-width: 700px) {
  .index-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .dialog-layer {
    align-items: center;
    padding: 24px;
  }
  .dialog-box {
    border-radius: 16px;
    max-height: 85vh;
  }
  .logo-link img {
    width: 200px;
  }
}

.index-tile .tile-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  display: inline-block;
  background: #fff4d6;
  color: #6b4b00;
  border: 1px solid #e6c56e;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
}

.badge.quiet {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: #b5d8e6;
}

.prime-eq-note {
  display: block;
  font-weight: 650;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.cbs-credit {
  max-width: var(--max);
  margin: 0 auto 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #c5d4b8;
  overflow-wrap: anywhere;
}

/* כרטיסים ריבועיים שווים; שורות המקור בחלונית המידע */
.index-tile-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  overflow: visible;
}
.index-tile-item .index-tile {
  flex: 1 1 auto;
}

.index-tile-item:has(.index-tile-info[aria-expanded="true"]),
.index-tile-item:focus-within {
  z-index: 6;
}

.index-tile-info {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  z-index: 3;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  background: var(--paper);
  color: var(--teal);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.index-tile-info:hover,
.index-tile-info:focus-visible {
  background: var(--teal);
  color: #fff;
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.index-tile-info[aria-expanded="true"] {
  background: var(--teal);
  color: #fff;
}

.index-tile-note {
  position: absolute;
  top: 36px;
  inset-inline-end: 0;
  z-index: 20;
  width: min(300px, calc(100vw - 32px));
  min-width: min(240px, calc(100vw - 32px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(46, 50, 51, 0.16);
  padding: 10px 12px;
  text-align: right;
}

.index-tile-note .src {
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.index-tile-note .src + .src {
  margin-top: 6px;
}

.src {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.src a {
  color: inherit;
  text-decoration: underline;
}
.pane-source .src + .src,
.changes li .src {
  margin-top: 4px;
}
.data-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.calc-source {
  margin-top: 6px;
}

/* מחשבונים: ריבועים שווים בגודל כרטיסי המדדים */
.calcs {
  margin-top: 16px;
}

.calc-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-tiles .calc-open {
  aspect-ratio: 1 / 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  padding: 12px;
  container-type: inline-size;
  overflow: hidden;
}

.calc-tiles .calc-open-title {
  font-size: clamp(14px, 10cqi, 17px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.calc-tiles .calc-open-hint {
  margin-top: auto;
}

.calc-tiles .calc-open-chevron {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  width: 24px;
  height: 24px;
}

.calc-tiles .calc-open {
  position: relative;
}

.choice-row.choice-row-2 {
  grid-template-columns: 1fr 1fr;
}

.choice-row.choice-row-2 button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1.3;
}

.choice-row.choice-row-2 button small {
  font-size: 12px;
  font-weight: 650;
  opacity: 0.85;
}

.choice-row button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.mode-hint {
  margin-top: 6px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pair .field {
  min-width: 0;
}

.field select {
  font: inherit;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  min-width: 0;
}

.field select:focus {
  outline: 2px solid var(--teal);
  border-color: var(--teal);
}

.month-year {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 6px;
}

.calc-error {
  margin: 0;
  background: var(--up-soft);
  color: var(--up);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
}

.calc-res > div > span small {
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
}

.calc-res b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc-res .chg.is-rise b {
  color: var(--up);
}

.calc-res .chg.is-drop b {
  color: var(--down);
}

@media (min-width: 700px) {
  .calc-tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 380px) {
  .pair {
    grid-template-columns: 1fr;
  }
}

/* מחשבון מס רכישה */
.choice-row.choice-row-tracks {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 700px) {
  .choice-row.choice-row-tracks {
    grid-template-columns: repeat(4, 1fr);
  }
}

.calc-res > .tax-tier {
  display: block;
  background: none;
  padding: 0;
}

.calc-res .tax-steps-title {
  margin: 6px 0 0;
  font-size: 15px;
}

.calc-res > .tax-steps {
  display: grid;
  width: 100%;
  justify-self: stretch;
  justify-content: stretch;
  align-items: stretch;
  gap: 6px;
  background: none;
  padding: 0;
}

.tax-steps > div {
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.calc-warn {
  margin: 0;
  font-size: 14px;
  color: var(--ink, #1f2a2e);
  background: #fff7e0;
  border-inline-start: 4px solid #d9a300;
  border-radius: 8px;
  padding: 8px 10px;
}

/* מחשבון הפריים: שש אפשרויות לתזוזת הריבית */
.choice-row.choice-row-shift {
  grid-template-columns: repeat(3, 1fr);
}

.choice-row.choice-row-shift button {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  min-height: 48px;
}

.choice-row.choice-row-shift button small {
  font-size: 14px;
  font-weight: 800;
}

/* מה מייחד את העמוד: פס קצר מתחת לכותרת */
.highlights {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.highlights li {
  background: var(--teal-soft);
  color: #00485e;
  border: 1px solid #b9e3f0;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.calcs h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

/* בנייד: כל מדד בשורה משלו, המספר בצד השמאלי */
@media (max-width: 699px) {
  .index-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .index-tile {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "kicker kicker"
      "title num"
      "extra num"
      "period period";
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
  }
  .index-tile .tile-kicker { grid-area: kicker; }
  .index-tile .tile-title { grid-area: title; font-size: 16px; }
  .index-tile .tile-num { grid-area: num; font-size: 1.6rem; }
  .index-tile .tile-extra { grid-area: extra; }
  .index-tile .tile-period { grid-area: period; }
  .index-tile-item {
    aspect-ratio: auto;
  }
  .index-tile .tile-num { justify-self: end; }
}

/* הזמנה לשיחה אחרי ההסבר על המדדים */
.contact-cta {
  margin: 18px 0 0;
  padding: 20px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--header), #2d5a1b);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 5px solid var(--brand);
}

.contact-cta-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
}

.contact-cta-text {
  margin: 0 0 14px;
  color: #dce8d4;
  font-size: 15px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: min(260px, 100%);
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--brand);
  color: #10200a;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.contact-btn:hover,
.contact-btn:focus-visible {
  background: #a4d65f;
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.footer-rights {
  max-width: var(--max);
  margin: 12px auto 0;
  font-size: 13px;
  color: #b9c9ae;
}
