/* הערכים כאן רשומים ב-design.md סעיף 3. ערך חדש נכנס קודם לטבלה שם. */
:root {
  --cream: #F7ECDB;
  --surface: #FBF4E8;
  --line: #E0CDB2;
  --text: #3B2A22;
  --text-2: #6E5546;
  --terracotta: #C4572E;
  --terracotta-deep: #9A3F1C;
  --success: #4F6B3A;
  --warning: #8A5A12;
  --error: #9A3F1C;

  --sweet: #E8A0A8;
  --sour: #E9C84A;
  --salty: #8FB8D8;
  --pungent: #E07A3F;
  --bitter: #7FA36B;
  --astringent: #8E6A9E;

  --font-head: 'Suez One', 'Heebo', serif;
  --font-hand: 'Amatic SC', 'Heebo', cursive;
  --font-body: 'Heebo', 'Arial Hebrew', system-ui, sans-serif;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;

  --radius: 14px;
  --radius-s: 8px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

ul {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

/* נקרא בקול לקורא מסך, ולא נראה על המסך */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--terracotta-deep);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

/* ששת הטעמים: פס דק בראש הדף */
.tastes {
  display: flex;
  height: 5px;
}
.tastes i {
  flex: 1;
}
.tastes i:nth-child(1) { background: var(--sweet); }
.tastes i:nth-child(2) { background: var(--sour); }
.tastes i:nth-child(3) { background: var(--salty); }
.tastes i:nth-child(4) { background: var(--pungent); }
.tastes i:nth-child(5) { background: var(--bitter); }
.tastes i:nth-child(6) { background: var(--astringent); }

.page {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--s5);
}

.masthead {
  padding-block: var(--s5) var(--s4);
}
.logo {
  display: block;
  width: min(260px, 72vw);
  height: auto;
}

/* חצי העונה: הדבר הגדול במסך */
.season {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s5) var(--s5) var(--s6);
}
.season__date {
  color: var(--text-2);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.season__date time {
  direction: ltr;
  unicode-bidi: isolate;
}
.season__name {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--terracotta);
  font-size: clamp(2.75rem, 12vw, 4.25rem);
  line-height: 1.05;
  margin-block: var(--s2) var(--s3);
}
.season__qualities {
  font-size: 1.25rem;
  line-height: 1.5;
}
.season__increase {
  margin-block-start: var(--s5);
  padding-block-start: var(--s4);
  border-block-start: 1px dashed var(--line);
}
.season__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-2);
}
.season__increase p {
  font-weight: 500;
}

/* האזור ושורת מזג האוויר: מתחת לחצי העונה */
.side {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.region {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding-inline: var(--s2);
}
.region__mine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.region__change,
.region__invite,
.weather__retry {
  min-height: 44px;
  padding: var(--s2) var(--s3);
  border: 0;
  border-radius: var(--radius-s);
  background: none;
  color: var(--terracotta-deep);
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.region__invite {
  padding: var(--s3) var(--s4);
  border: 1px dashed var(--terracotta-deep);
  text-align: start;
  text-decoration: none;
}
.region__change:hover,
.region__invite:hover,
.weather__retry:hover {
  background: var(--surface);
}
.region__change:active,
.region__invite:active,
.weather__retry:active {
  background: var(--line);
}
.region__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}
.region__option {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  min-height: 44px;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  text-align: start;
  cursor: pointer;
}
.region__option:hover {
  border-color: var(--text-2);
}
/* האזור שנבחר: עיגול זית ומילים מודגשות, לא רק צבע */
.region__option[aria-pressed='true'] {
  border-color: var(--success);
  font-weight: 700;
}
.region__option[aria-pressed='true']::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
}
.weather {
  padding-inline-start: var(--s3);
  border-inline-start: 3px solid var(--text-2);
  font-weight: 500;
}
.weather--off {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s2);
  border-color: var(--line);
  color: var(--text-2);
  font-weight: 400;
}
.weather--loading {
  border-color: var(--line);
}
.weather--loading .skeleton {
  width: 85%;
  height: 1.6em;
}

/* הרשימה של היום */
.today {
  margin-block-start: var(--s6);
}
.today__title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
  margin-block-end: var(--s4);
}

.cats {
  column-gap: var(--s7);
}

.cat {
  break-inside: avoid;
  padding-block: var(--s4) var(--s5);
  border-block-start: 2px solid var(--text);
}
.cat__name {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.3;
  margin-block-end: var(--s2);
}

.item {
  display: flex;
  flex-direction: column;
  padding-block: var(--s3);
  border-block-end: 1px dashed var(--line);
}
.item__name {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.35;
}
.item__line {
  color: var(--text-2);
  font-size: 1rem;
  padding-inline-start: calc(10px + var(--s2));
}

/* מתאים: עיגול זית מלא. פחות מתאים: עיגול טרקוטה ריק, והשורה בטרקוטה כהה */
.mark {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.item--suits .mark {
  background: var(--success);
}
.item--less .mark {
  border: 2px solid var(--terracotta-deep);
}
.item--less .item__line {
  color: var(--terracotta-deep);
}
.item--less .item__stored {
  color: var(--text-2);
}

.cat__none {
  color: var(--text-2);
  padding-block: var(--s3);
}
.item__stored {
  color: var(--text-2);
  font-weight: 500;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  margin-block-start: var(--s2);
  padding: var(--s2) var(--s3);
  margin-inline-start: calc(var(--s3) * -1);
  border: 0;
  border-radius: var(--radius-s);
  background: none;
  color: var(--terracotta-deep);
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
}
.more:hover {
  background: var(--surface);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.more:active {
  background: var(--line);
}
/* חץ למטה: בלי כיוון של שפה, ולכן בכוונה עם צדדים פיזיים */
.more__chev {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}
.more[aria-expanded='true'] .more__chev {
  transform: translateY(2px) rotate(-135deg);
}

/* הודעות ומצבים */
.notice {
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.notice--error {
  border-color: var(--error);
}
.notice--error p {
  color: var(--error);
  font-weight: 500;
  margin-block-end: var(--s4);
}
.notice--error p::before {
  content: '! ';
  font-weight: 700;
}

.button {
  min-height: 44px;
  padding: var(--s2) var(--s5);
  border: 0;
  border-radius: var(--radius-s);
  background: var(--terracotta-deep);
  color: var(--surface);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.button:hover {
  background: var(--text);
}
.button:active:not(:disabled) {
  background: var(--text);
  transform: translateY(1px);
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.skeleton {
  display: block;
  border-radius: var(--radius-s);
  background: linear-gradient(90deg, var(--line), var(--surface), var(--line));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  color: transparent;
}
.skeleton--short {
  width: 30%;
}
.skeleton--block {
  height: 180px;
  margin-block-end: var(--s5);
}
.season .skeleton + .skeleton {
  margin-block-start: var(--s3);
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .more__chev { transition: none; }
}

.foot {
  margin-block: var(--s7) var(--s6);
  padding-block-start: var(--s4);
  border-block-start: 1px solid var(--line);
  color: var(--text-2);
  font-size: 1rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s5);
}
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--terracotta-deep);
  font-weight: 500;
  text-underline-offset: 4px;
}
.foot a:hover {
  color: var(--text);
}

/* עמוד "על השיטה": טור אחד, ברוחב נוח לקריאה */
.logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.credit__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.about {
  max-width: 42rem;
}
.about__title {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--terracotta);
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  line-height: 1.1;
  margin-block: var(--s2) var(--s4);
}
.about__lead {
  font-size: 1.25rem;
  line-height: 1.5;
}
.about section {
  margin-block-start: var(--s6);
  padding-block-start: var(--s4);
  border-block-start: 2px solid var(--text);
}
.about h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.3;
  margin-block-end: var(--s3);
}
.about section > * + * {
  margin-block-start: var(--s3);
}
.about section > h2 + * {
  margin-block-start: 0;
}
.about__list li,
.halves li {
  padding-block: var(--s2);
  border-block-end: 1px dashed var(--line);
}
.halves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--s5);
}
.halves li {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
}
.halves time {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
.credit {
  color: var(--text-2);
  font-size: 1rem;
}
.about a:not(.button) {
  color: var(--terracotta-deep);
  text-underline-offset: 3px;
}
.about__note {
  margin-block-start: var(--s6);
  font-weight: 500;
}
.about__back {
  margin-block-start: var(--s4);
}
a.button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.noscript {
  max-width: 1120px;
  margin: var(--s5) auto;
  padding-inline: var(--s5);
}

/* טאבלט: הקטגוריות בשני טורים */
@media (min-width: 720px) {
  .page {
    padding-inline: var(--s6);
  }
  /* רשת ולא columns: פתיחת "עוד זמינים" לא מקפיצה קטגוריות בין הטורים */
  .cats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* מחשב: חצי העונה נשאר בצד, הרשימה לידו */
@media (min-width: 1000px) {
  .layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: var(--s7);
    align-items: start;
  }
  /* כשהעמודה גבוהה מהמסך (למשל בחירת האזור פתוחה) יש לה גלילה משלה, כדי שהקישור לצלחת לא ייעלם.
     הריווח של 6px משאיר מקום למסגרת הפוקוס, שאחרת הייתה נחתכת בשוליים */
  .side {
    position: sticky;
    top: var(--s5);
    max-height: calc(100vh - 2 * var(--s5));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    margin: -6px;
  }
  .season__name {
    font-size: 3.5rem;
  }
  .today {
    margin-block-start: 0;
  }
}

/* שם שלא נשבר בין שורות */
.nowrap {
  white-space: nowrap;
}

/* כפתור משני: מסגרת בלי מילוי, כדי שהטרקוטה המלאה תישאר לדבר אחד */
.button--quiet {
  border: 1.5px solid var(--terracotta-deep);
  background: transparent;
  color: var(--terracotta-deep);
}
.button--quiet:hover {
  background: var(--surface);
  color: var(--text);
}
.button--quiet:active:not(:disabled) {
  background: var(--line);
  color: var(--text);
}
.plate-link {
  align-self: flex-start;
}

/* מסך הצלחת */
.plate__intro {
  font-size: 1.125rem;
  line-height: 1.5;
}
.meals-wrap {
  margin-block-start: var(--s5);
  padding-block-start: var(--s4);
  border-block-start: 1px dashed var(--line);
}
.meals__label {
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 500;
  margin-block-end: var(--s2);
}
.meals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
.meals__option {
  min-height: 44px;
  padding: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--cream);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}
.meals__option:hover {
  border-color: var(--text-2);
}
.meals__option:active {
  background: var(--line);
}
/* הארוחה שנבחרה: מסגרת כהה ומילים מודגשות, לא רק צבע */
.meals__option[aria-pressed='true'] {
  border: 2px solid var(--text);
  background: var(--surface);
  font-weight: 700;
}

.plate {
  margin-block-start: var(--s6);
}
.plate-group {
  padding-block: var(--s4) var(--s5);
  border-block-start: 2px solid var(--text);
}
.plate-group__name {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.3;
  margin-block-end: var(--s2);
}
.plate-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  align-items: start;
  gap: var(--s1) var(--s3);
  padding-block: var(--s3);
  border-block-end: 1px dashed var(--line);
}
/* הטעם: פס בצבע הטעם, ותמיד גם השם שלו */
.plate-row__taste {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 1.75rem;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-2);
}
.plate-row__taste::before {
  content: '';
  flex: none;
  width: 6px;
  height: 1.25rem;
  border-radius: 3px;
  background: var(--taste);
}
.taste--sweet { --taste: var(--sweet); }
.taste--sour { --taste: var(--sour); }
.taste--salty { --taste: var(--salty); }
.taste--pungent { --taste: var(--pungent); }
.taste--bitter { --taste: var(--bitter); }
.taste--astringent { --taste: var(--astringent); }

.plate-row__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.plate-row__name {
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.35;
}
.plate-row__body .item__line {
  padding-inline-start: 0;
}
.plate-row__note {
  font-weight: 500;
}
.plate-row__none {
  color: var(--text-2);
}
.plate-row__action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s1);
  max-width: 8.5rem;
}
.plate-row__swap {
  min-height: 44px;
  min-width: 44px;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--terracotta-deep);
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
}
.plate-row__swap:hover {
  border-color: var(--terracotta-deep);
}
.plate-row__swap:active {
  background: var(--line);
}
.plate-row__swap:disabled {
  color: var(--text-2);
  opacity: 0.6;
  cursor: not-allowed;
}
.plate-row__why {
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.3;
  text-align: end;
}
.plate__back {
  margin-block-start: var(--s5);
}

/* טלפון צר: הטעם עובר מעל המצרך */
@media (max-width: 400px) {
  .plate-row {
    grid-template-columns: 1fr auto;
  }
  .plate-row__taste {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1000px) {
  .plate {
    margin-block-start: 0;
  }
}
