/* ==========================================================================
   כמה זה עולה לי באמת? – גיליון סגנונות יחיד, Mobile-first, RTL
   ========================================================================== */

@font-face {
  font-family: 'Noto Sans Hebrew';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  src: url('/assets/fonts/noto-sans-hebrew-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: 'Noto Sans Hebrew';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  src: url('/assets/fonts/noto-sans-hebrew-latin.woff2') format('woff2');
  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;
}

:root {
  --ink: #101b3b; /* דיו כחול כהה – טקסט ולוח התוצאה */
  --ink-soft: #55607a;
  --page: #e8ecf4;
  --paper: #ffffff;
  --line: #cfd6e4;
  --marker: #ffdd1f; /* מרקר צהוב – רק לפעולה הראשית ולמספר הגדול */
  --marker-deep: #e2bf00;
  --save: #7fe6b8; /* ירוק חיסכון, על רקע הדיו */
  --alert: #c8261b;

  --font: 'Noto Sans Hebrew', 'Arimo', 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --radius-l: 28px;
  --radius-m: 16px;
  --radius-s: 12px;
  --gutter: 16px;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-block-start: 12px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
fieldset {
  margin: 0;
  padding: 0;
}

fieldset {
  border: 0;
  min-inline-size: 0;
}

ul {
  list-style: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: #fff;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- כותרת האתר ---------- */

.site-header,
.stage,
.content,
.ad-slot,
.site-footer {
  inline-size: min(100% - 2 * var(--gutter), 1080px);
  margin-inline: auto;
}

.site-header {
  padding-block: 14px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.brand__mark {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 10px;
  background: var(--marker);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}

/* ---------- אזור עליון: טופס + תוצאה ---------- */

.stage {
  display: grid;
  gap: 20px;
  padding-block: 10px 36px;
}

.hero__title {
  font-size: clamp(2.15rem, 1.25rem + 4.6vw, 3.6rem);
  font-weight: 800;
  font-stretch: 78%;
  line-height: 1.06;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.hero__lead {
  margin-block-start: 12px;
  max-inline-size: 34ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- טופס ---------- */

.calc {
  margin-block-start: 20px;
  padding: 8px 16px 18px;
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow:
    0 1px 0 rgba(16, 27, 59, 0.06),
    0 18px 40px -22px rgba(16, 27, 59, 0.35);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  align-items: center;
  column-gap: 12px;
  padding-block: 10px;
  border-block-end: 1px solid var(--line);
}

.row__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.row__icon {
  flex: none;
  inline-size: 1.6em;
  font-size: 1.25rem;
  text-align: center;
}

.money {
  display: flex;
  align-items: center;
  direction: ltr;
  block-size: 48px;
  padding-inline: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: #f6f8fc;
  transition: border-color 0.15s, background-color 0.15s;
}

.money:focus-within {
  border-color: var(--ink);
  background: var(--paper);
  outline: 3px solid var(--marker);
  outline-offset: 1px;
}

.money:has([aria-invalid='true']) {
  border-color: var(--alert);
  background: #fff5f4;
}

.money__sign {
  color: var(--ink-soft);
  font-weight: 600;
}

.money__input {
  flex: 1;
  min-inline-size: 0;
  block-size: 100%;
  padding: 0 0 0 6px;
  border: 0;
  background: none;
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: left;
  outline: none;
}

.money__input::placeholder {
  color: #9aa3b8;
  font-weight: 500;
}

.money--plain .money__input {
  padding: 0;
  text-align: center;
}

.row__error {
  grid-column: 1 / -1;
  margin-block-start: 6px;
  color: var(--alert);
  font-size: 0.9375rem;
  font-weight: 600;
}

.row--custom {
  grid-template-columns: 3rem minmax(0, 1fr) 2.5rem;
  grid-template-areas:
    'pick name remove'
    'money money money'
    'error error error';
  gap: 8px;
}

.row--custom .row__pick {
  grid-area: pick;
}

.row--custom .row__name {
  grid-area: name;
}

.row--custom .row__remove {
  grid-area: remove;
}

.row--custom .money {
  grid-area: money;
  justify-self: end;
  inline-size: 7.5rem;
}

.row--custom .row__error {
  grid-area: error;
  margin-block-start: 0;
}

.row__pick,
.row__name {
  block-size: 48px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: #f6f8fc;
}

.row__pick {
  padding: 0;
  font-size: 1.25rem;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.row__name {
  min-inline-size: 0;
  padding-inline: 12px;
  font-weight: 600;
}

.row__name::placeholder {
  color: #7d879e;
  font-weight: 500;
}

.row__pick:focus-visible,
.row__name:focus-visible {
  border-color: var(--ink);
  background: var(--paper);
  outline: 3px solid var(--marker);
  outline-offset: 1px;
}

.row__remove {
  block-size: 44px;
  border: 0;
  border-radius: var(--radius-s);
  background: none;
  color: var(--ink-soft);
  font-size: 1.5rem;
  line-height: 1;
}

.row__remove:hover {
  background: #f0f2f7;
  color: var(--alert);
}

.add-btn {
  display: block;
  inline-size: 100%;
  margin-block: 12px 2px;
  padding: 11px 16px;
  border: 1.5px dashed #9aa5bd;
  border-radius: var(--radius-s);
  background: none;
  font-weight: 700;
}

.add-btn:hover {
  border-color: var(--ink);
  background: #f6f8fc;
}

.row--days {
  border-block-end: 0;
}

.calc__error {
  margin-block: 4px 12px;
  padding: 10px 14px;
  border-radius: var(--radius-s);
  background: #fff0ee;
  color: var(--alert);
  font-weight: 600;
}

.cta {
  display: block;
  inline-size: 100%;
  margin-block-start: 8px;
  padding: 17px 20px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--marker);
  box-shadow:
    0 3px 0 var(--marker-deep),
    0 14px 26px -14px rgba(16, 27, 59, 0.55);
  font-size: 1.3125rem;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.08s, box-shadow 0.08s;
}

.cta:hover {
  background: #ffe54d;
}

.cta:active {
  transform: translateY(3px);
  box-shadow:
    0 0 0 var(--marker-deep),
    0 6px 14px -10px rgba(16, 27, 59, 0.55);
}

.calc__note {
  margin-block-start: 12px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-align: center;
}

/* ---------- לוח התוצאה ---------- */

.result {
  padding: 22px 16px 26px;
  border-radius: var(--radius-l);
  background: var(--ink);
  color: #fff;
  outline: none;
}

/* במובייל אין מצב ריק: הלוח מופיע רק אחרי החישוב */
.result[data-state='empty'] {
  display: none;
}

.receipt-shadow {
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.35));
}

.receipt {
  --tooth: 9px;
  container-type: inline-size;
  padding: 26px 18px calc(24px + var(--tooth));
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  border-start-start-radius: 6px;
  border-start-end-radius: 6px;
  /* שוליים משוננים בתחתית, כמו קבלה שנתלשה מהקופה */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tooth)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--tooth)) 100%;
}

.receipt.is-printing {
  animation: print 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes print {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-14px);
  }
  to {
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

.receipt__kicker {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
}

.receipt__lead {
  margin-block-start: 10px;
  font-size: 1.125rem;
  font-weight: 600;
}

.receipt__total {
  margin-block: 2px 0;
  line-height: 1;
}

.receipt__amount {
  --chars: 7;
  display: inline-block;
  padding-inline: 0.12em;
  background: linear-gradient(transparent 52%, var(--marker) 52% 90%, transparent 90%);
  font-size: clamp(3.25rem, 17vw, 5.25rem);
  font-size: min(clamp(3.25rem, 17vw, 5.25rem), calc(100cqi / (var(--chars) * 0.56)));
  font-weight: 900;
  font-stretch: 62.5%;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.receipt__period {
  font-size: 1.375rem;
  font-weight: 800;
}

.periods {
  margin-block-start: 20px;
  padding-block-start: 16px;
  border-block-start: 2px dashed var(--line);
}

.periods__legend {
  inline-size: 100%;
  margin-block-end: 10px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: start;
}

.periods__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.period {
  position: relative;
  container-type: inline-size;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.period input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.period:hover {
  border-color: #8f9ab3;
}

.period:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.period:has(input:focus-visible) {
  outline: 3px solid var(--marker);
  outline-offset: 2px;
}

.period__label {
  font-size: 0.9375rem;
  font-weight: 600;
  opacity: 0.8;
}

.period__amount {
  --chars: 6;
  font-size: 1.25rem;
  font-size: min(1.25rem, calc(100cqi / (var(--chars) * 0.6)));
  font-weight: 800;
  font-stretch: 85%;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.breakdown {
  margin-block-start: 18px;
  padding-block-start: 16px;
  border-block-start: 2px dashed var(--line);
  text-align: start;
}

.breakdown__title {
  margin-block-end: 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 600;
}

.breakdown__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  padding-block: 6px;
}

.breakdown__name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.breakdown__amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.breakdown__bar {
  grid-column: 1 / -1;
  block-size: 8px;
  margin-block-start: 4px;
  border-radius: 99px;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat right / var(--share) 100%, #e6eaf2;
}

.receipt__note {
  margin-block-start: 18px;
  padding-block-start: 16px;
  border-block-start: 2px dashed var(--line);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

/* מצב ריק (מסכים רחבים בלבד) */
.receipt--empty {
  padding-block: 44px calc(44px + var(--tooth));
  color: var(--ink-soft);
}

.receipt__empty-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.receipt__ghost {
  display: grid;
  gap: 14px;
  margin-block-start: 26px;
}

.receipt__ghost span {
  block-size: 12px;
  border-radius: 99px;
  background: #e6eaf2;
}

.receipt__ghost span:nth-child(2) {
  inline-size: 70%;
}

.receipt__ghost span:nth-child(4) {
  inline-size: 45%;
}

/* ---------- חיסכון ---------- */

.saving {
  margin-block-start: 26px;
  text-align: center;
}

.saving__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.saving__line {
  margin-block-start: 8px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

.saving__line--small {
  margin-block-start: 2px;
  font-size: 1.125rem;
  font-weight: 600;
}

.saving__amount {
  color: var(--save);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* ---------- בבית מול בחוץ (מתחת לתוצאה, על רקע הדיו) ---------- */

.home {
  margin-block-start: 24px;
  padding-block-start: 22px;
  border-block-start: 1.5px dashed rgba(255, 255, 255, 0.28);
  text-align: center;
}

.home__field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin-block-start: 12px;
}

.home__label {
  color: #d5dbea;
  font-size: 1rem;
  font-weight: 600;
}

.home .money {
  inline-size: 124px;
}

.home .money__input {
  color: var(--ink);
}

.home__error {
  margin-block-start: 8px;
  color: #ffb3ab; /* אדום בהיר, קריא על רקע הדיו */
  font-size: 0.9375rem;
  font-weight: 600;
}

.home__result {
  margin-block-start: 6px;
}

/* ---------- שיתוף ---------- */

.share {
  margin-block-start: 24px;
  text-align: center;
}

.share__btn {
  display: block;
  inline-size: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--marker);
  color: var(--ink);
  font-size: 1.1875rem;
  font-weight: 800;
}

.share__btn:hover {
  background: #ffe54d;
}

.result :focus-visible {
  outline-color: var(--marker);
}

.share__panel {
  margin-block-start: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-m);
  text-align: start;
}

.share__preview {
  white-space: pre-line;
  line-height: 1.45;
}

.share__heading {
  margin-block: 18px 8px;
  font-size: 1rem;
  font-weight: 700;
}

.share__hint {
  margin-block: -4px 10px;
  color: #c9d1e6;
  font-size: 0.875rem;
  line-height: 1.4;
}

.share__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share__grid--ai {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.share__grid .share__option {
  inline-size: 100%;
}

.share__option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 46px;
  padding: 8px 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-s);
  background: none;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

/* לוגואים רשמיים של הפלטפורמות: מוצגים כמו שהם, בלי שינוי צבע, חיתוך או אפקטים */
.share__icon {
  flex: none;
  inline-size: auto;
  block-size: 24px;
}

.share__icon[height='28'] {
  block-size: 28px;
}

.share__option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.share__option--primary {
  border-color: var(--marker);
  background: var(--marker);
  color: var(--ink);
}

.share__option--primary:hover {
  background: #ffe54d;
}

.share__steps {
  margin-block-start: 12px;
  padding: 14px;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.08);
}

.share__steps-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  outline: none;
}

.share__steps-intro {
  margin-block-start: 6px;
  color: #dfe5f3;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.share__steps-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-block-start: 12px;
}

.share__steps-img {
  flex: none;
  inline-size: 90px;
  block-size: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.share__steps-list {
  margin: 0;
  padding-inline-start: 1.3em;
  line-height: 1.45;
}

.share__steps-list li + li {
  margin-block-start: 6px;
}

.share__steps-actions {
  display: grid;
  gap: 8px;
  margin-block-start: 14px;
}

.share__status {
  font-size: 0.9375rem;
}

.share__status:not(:empty) {
  margin-block-start: 10px;
}

.result__edit {
  display: inline-block;
  margin-block-start: 8px;
  padding: 8px 12px;
  color: #c9d1e6;
  font-size: 0.9375rem;
}

/* ---------- מקומות שמורים לפרסומות (מוסתרים עד שיוזן קוד אמיתי) ---------- */

.ad-slot {
  min-block-size: 280px;
  margin-block: 8px 28px;
}

/* ---------- תוכן ---------- */

.content {
  max-inline-size: 680px;
  margin-inline: max(var(--gutter), calc((100% - 1080px) / 2)) auto;
  padding-block: 12px 28px;
}

.content h2 {
  margin-block-end: 14px;
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.1rem);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1.15;
  text-wrap: balance;
}

.content p + p {
  margin-block-start: 14px;
}

.content h3 {
  margin-block: 24px 8px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.table-wrap {
  margin-block: 18px;
  overflow-x: auto;
}

.content table {
  inline-size: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.content caption {
  padding-block-end: 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-align: start;
}

.content th,
.content td {
  padding: 10px 8px;
  border-block-end: 1px solid var(--line);
  text-align: start;
  white-space: nowrap;
}

.content thead th {
  border-block-end: 2px solid var(--ink);
  font-size: 0.9375rem;
}

.content tbody th {
  font-weight: 700;
}

.more__list {
  display: grid;
  gap: 4px;
}

.more__list a {
  display: inline-block;
  padding-block: 6px;
  font-weight: 700;
}

.faq details {
  border-block-start: 1px solid var(--line);
}

.faq details:last-of-type {
  border-block-end: 1px solid var(--line);
}

.faq summary {
  padding-block: 14px;
  font-weight: 700;
  cursor: pointer;
}

.faq details p {
  padding-block-end: 16px;
  color: #2c3654;
}

/* ---------- תחתית ---------- */

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer__nav a {
  padding-block: 4px;
}

/* ---------- הודעת פתיחה ---------- */

html:has(.notice[open]) {
  overflow: hidden;
}

.notice {
  inline-size: min(100% - 32px, 520px);
  max-block-size: calc(100dvh - 32px);
  padding: 24px 22px 22px;
  border: 0;
  border-radius: var(--radius-l);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}

.notice::backdrop {
  background: rgba(16, 27, 59, 0.72);
}

.notice__title {
  margin-block-end: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1.15;
  text-wrap: balance;
}

.notice p {
  line-height: 1.5;
}

.notice p + p {
  margin-block-start: 10px;
}

.notice__ok {
  display: block;
  inline-size: 100%;
  margin-block-start: 18px;
  padding: 15px 20px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--marker);
  box-shadow: 0 3px 0 var(--marker-deep);
  font-size: 1.1875rem;
  font-weight: 800;
}

.notice__ok:hover {
  background: #ffe54d;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 20px 32px;
  border-block-start: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ---------- עמודי טקסט (פרטיות, 404) ---------- */

.page {
  inline-size: min(100% - 2 * var(--gutter), 680px);
  margin-inline: auto;
  padding-block: 24px 48px;
}

.page h1 {
  margin-block-end: 16px;
  font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 1.1;
}

.page h2 {
  margin-block: 26px 8px;
  font-size: 1.3125rem;
  font-weight: 800;
}

.page p + p,
.page p + ul,
.page ul + p {
  margin-block-start: 12px;
}

.page ul {
  padding-inline-start: 1.3em;
  list-style: disc;
}

.page li + li {
  margin-block-start: 6px;
}

.page__updated {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.page__toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-block-start: 36px;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--line);
  font-size: 0.9375rem;
}

.page__back {
  display: inline-block;
  margin-block-start: 28px;
  padding: 12px 20px;
  border-radius: var(--radius-m);
  background: var(--marker);
  font-weight: 800;
  text-decoration: none;
}

/* ---------- מסכים רחבים ---------- */

@media (min-width: 480px) {
  .row--custom {
    grid-template-columns: 3rem minmax(0, 1fr) 7.5rem 2.5rem;
    grid-template-areas:
      'pick name money remove'
      'error error error error';
  }
}

@media (min-width: 600px) {
  :root {
    --gutter: 28px;
  }

  .calc {
    padding: 12px 24px 24px;
  }

  .result {
    padding: 32px 28px;
  }

  .receipt {
    padding-inline: 28px;
  }
}

@media (min-width: 960px) {
  .site-header {
    padding-block: 22px 10px;
  }

  .stage {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: 44px;
    padding-block: 18px 56px;
  }

  .calc {
    margin-block-start: 28px;
  }

  /* הטופס נשאר במקומו בזמן גלילה לאורך התוצאה */
  .stage__input {
    position: sticky;
    inset-block-start: 20px;
  }

  .result,
  .result[data-state='empty'] {
    display: block;
    padding: 32px;
  }

  .result__edit {
    display: none;
  }

  .content {
    padding-block-end: 40px;
  }
}

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