@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir.woff2") format("woff2"),
       url("../fonts/Vazir.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Medium.woff2") format("woff2"),
       url("../fonts/Vazir-Medium.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Bold.woff2") format("woff2"),
       url("../fonts/Vazir-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #17211e;
  --ink-soft: #63706b;
  --paper: #f3f1e9;
  --surface: #fffdf8;
  --surface-muted: #f8f6ef;
  --line: #dedfd7;
  --forest: #173d32;
  --forest-light: #245746;
  --forest-soft: #dce9e2;
  --sun: #f3c969;
  --sun-light: #ffe8ad;
  --rose: #bd4a4a;
  --rose-soft: #fbe6e1;
  --shadow: 0 24px 70px rgba(28, 41, 35, 0.09);
  --shadow-soft: 0 12px 36px rgba(28, 41, 35, 0.07);
}

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

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% -10%, rgba(243, 201, 105, 0.2), transparent 28rem),
    var(--paper);
  font-family: "Vazir", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 15px;
  color: var(--surface);
  background: var(--forest);
  box-shadow: 0 8px 24px rgba(23, 61, 50, 0.18);
}

.brand__mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__copy {
  display: grid;
  line-height: 1.2;
}

.brand__copy strong {
  direction: ltr;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__copy small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
}

.site-header__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(23, 61, 50, 0.12);
  border-radius: 99px;
  color: #43514c;
  background: rgba(255, 253, 248, 0.55);
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fa572;
  box-shadow: 0 0 0 5px rgba(79, 165, 114, 0.12);
}

.hero {
  position: relative;
  isolation: isolate;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 38px;
  color: #fffdf8;
  background:
    radial-gradient(circle at 8% 18%, rgba(243, 201, 105, 0.16) 0 1px, transparent 2px) 0 0 / 24px 24px,
    linear-gradient(135deg, #214e40 0%, #173d32 42%, #102c25 100%);
  box-shadow: 0 32px 90px rgba(23, 61, 50, 0.2);
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: -240px;
  left: -160px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 201, 105, 0.26), rgba(243, 201, 105, 0) 68%);
  content: "";
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: -105px;
  bottom: -205px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 46px rgba(255, 255, 255, 0.025),
    0 0 0 92px rgba(255, 255, 255, 0.018);
  content: "";
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(1110px, calc(100% - 80px));
  margin: 0 auto;
  padding: 62px 0 48px;
}

.hero__intro {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sun);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow::before {
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-left: 9px;
  vertical-align: middle;
  background: currentColor;
  content: "";
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.hero__lead {
  margin: 14px 0 0;
  color: rgba(255, 253, 248, 0.65);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.date-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.date-card {
  position: relative;
  min-width: 0;
  min-height: 168px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, background 180ms ease;
}

.date-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.date-card--featured {
  border-color: transparent;
  color: #19372f;
  background:
    radial-gradient(circle at 0 100%, rgba(255, 255, 255, 0.4), transparent 50%),
    linear-gradient(145deg, var(--sun-light), var(--sun));
  box-shadow: 0 16px 36px rgba(9, 27, 22, 0.14);
}

.date-card--featured:hover {
  background:
    radial-gradient(circle at 0 100%, rgba(255, 255, 255, 0.4), transparent 50%),
    linear-gradient(145deg, #ffebb9, #f3c969);
}

.date-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.date-card__label {
  color: rgba(255, 253, 248, 0.64);
  font-size: 12px;
  font-weight: 500;
}

.date-card--featured .date-card__label {
  color: rgba(25, 55, 47, 0.65);
}

.date-card__index {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  color: rgba(255, 253, 248, 0.75);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
}

.date-card--featured .date-card__index {
  border-color: rgba(25, 55, 47, 0.12);
  color: #19372f;
  background: rgba(255, 255, 255, 0.3);
}

.date-card__date {
  margin: 24px 0 0;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  font-weight: 500;
  line-height: 1.55;
}

.date-card__digits {
  margin: 7px 0 0;
  color: rgba(255, 253, 248, 0.46);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-align: right;
}

.date-card--featured .date-card__digits {
  color: rgba(25, 55, 47, 0.52);
}

.hero__quote {
  margin-top: 16px;
}

.quote-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 18px;
  align-items: start;
  margin: 0;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(6, 26, 21, 0.25);
}

.quote-card__mark {
  grid-row: 1 / span 2;
  color: var(--sun);
  font-family: Georgia, serif;
  font-size: 46px;
  line-height: 0.9;
}

.quote-card blockquote {
  margin: 0;
}

.quote-card blockquote p {
  margin: 0;
  color: rgba(255, 253, 248, 0.88);
  font-size: 14px;
  line-height: 1.9;
}

.quote-card figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 253, 248, 0.46);
  font-size: 11px;
}

.quote-card figcaption span {
  width: 18px;
  height: 1px;
  background: rgba(255, 253, 248, 0.34);
}

.calendar-section {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 82px 0 92px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.eyebrow--dark {
  margin-bottom: 6px;
  color: #61706a;
}

.section-heading > p {
  max-width: 390px;
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.dashboard-grid__calendar,
.dashboard-grid__occasions {
  min-width: 0;
}

.dashboard-grid__occasions {
  position: sticky;
  top: 20px;
}

.panel {
  border: 1px solid rgba(32, 55, 47, 0.08);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.calendar-panel {
  min-height: 540px;
  padding: 26px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
}

.calendar-toolbar__title {
  min-width: 180px;
  text-align: center;
}

.calendar-toolbar__title > span {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.calendar-toolbar__title h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 700;
  white-space: nowrap;
}

.month-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #41504a;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.month-button:first-child {
  justify-self: start;
}

.month-button:last-child {
  justify-self: end;
}

.month-button:hover {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  transform: translateY(-1px);
}

.month-button:focus-visible {
  outline: 3px solid rgba(243, 201, 105, 0.65);
  outline-offset: 2px;
}

.month-button:disabled {
  cursor: wait;
  opacity: 0.5;
  transform: none;
}

.month-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-table-wrap {
  width: 100%;
  overflow: hidden;
}

.calendar-grid {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 5px;
  table-layout: fixed;
}

.calendar-grid th {
  height: 38px;
  padding: 0 2px 9px;
  color: #7c8782;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.calendar-grid th.calendar-grid__friday {
  color: var(--rose);
}

.calendar-day {
  position: relative;
  height: 62px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #34413c;
  background: var(--surface-muted);
  cursor: default;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.calendar-day:hover {
  border-color: #cad6cf;
  background: #f1f4ef;
  transform: translateY(-1px);
}

.calendar-day--friday {
  color: var(--rose);
  background: #fff5f1;
}

.calendar-day--adjacent {
  color: #afb7b3;
  background: transparent;
  font-weight: 400;
}

.calendar-day--adjacent.calendar-day--friday {
  color: #d9aaa6;
}

.calendar-day--today {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
  box-shadow: 0 10px 24px rgba(23, 61, 50, 0.22);
}

.calendar-day--today::after {
  position: absolute;
  right: 50%;
  bottom: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sun);
  content: "";
  transform: translateX(50%);
}

.calendar-day--today:hover {
  border-color: var(--forest-light);
  background: var(--forest-light);
}

.occasions-panel {
  overflow: hidden;
}

.occasions-panel__header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 25px 24px 21px;
  border-bottom: 1px solid #ebece6;
}

.occasions-panel__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--forest);
  background: var(--forest-soft);
}

.occasions-panel__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.occasions-panel__header > div > span {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
}

.occasions-panel__header h3 {
  margin: 1px 0 0;
  font-size: 18px;
  line-height: 1.4;
}

.occasion-list {
  max-height: 570px;
  margin: 0;
  padding: 5px 20px 16px;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: #cad3ce transparent;
  scrollbar-width: thin;
}

.occasion-list__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px 2px;
  border-bottom: 1px solid #ecece6;
}

.occasion-list__item:last-child {
  border-bottom: 0;
}

.occasion-list__day {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 12px;
  font-weight: 700;
}

.occasion-list__name {
  padding-top: 5px;
  color: #4c5854;
  font-size: 12px;
  line-height: 1.75;
}

.occasion-list__item--holiday .occasion-list__day {
  color: var(--rose);
  background: var(--rose-soft);
}

.occasion-list__item--holiday .occasion-list__name {
  color: #8d4646;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 32px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-state span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #b58b37;
  background: #fff3d5;
}

.empty-state p {
  max-width: 210px;
  margin: 14px 0 0;
  font-size: 12px;
}

#placeholder,
#monthOccasionsPlaceholder {
  position: relative;
  transition: opacity 150ms ease;
}

#placeholder.is-loading,
#monthOccasionsPlaceholder.is-loading {
  opacity: 0.55;
}

#placeholder.has-error .calendar-panel {
  border-color: rgba(189, 74, 74, 0.5);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid rgba(23, 61, 50, 0.1);
}

.brand--footer .brand__mark {
  box-shadow: none;
}

.brand__mark--small {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.site-footer > p {
  margin: 0;
  color: #7b8782;
  font-size: 11px;
}

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

@media (max-width: 1020px) {
  .date-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .date-card {
    min-height: 150px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid__occasions {
    position: static;
  }

  .occasion-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 32px);
    padding: 16px 0;
  }

  .site-header__status {
    padding: 8px 11px;
    font-size: 10px;
  }

  .brand__mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
  }

  .brand__copy strong {
    font-size: 15px;
  }

  .brand__copy small {
    font-size: 9px;
  }

  .hero {
    width: calc(100% - 16px);
    border-radius: 28px;
  }

  .hero__content {
    width: calc(100% - 32px);
    padding: 40px 0 24px;
  }

  .hero h1 {
    max-width: 420px;
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .date-overview {
    gap: 9px;
    margin-top: 28px;
  }

  .date-card {
    min-height: 142px;
    padding: 15px;
    border-radius: 18px;
  }

  .date-card__date {
    margin-top: 18px;
    font-size: 13px;
  }

  .date-card__digits {
    font-size: 10px;
  }

  .quote-card {
    padding: 18px;
    border-radius: 18px;
  }

  .quote-card blockquote p {
    font-size: 12px;
  }

  .calendar-section {
    width: calc(100% - 28px);
    padding: 58px 0 66px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 11px;
  }

  .panel {
    border-radius: 22px;
  }

  .calendar-panel {
    min-height: auto;
    padding: 18px 12px;
  }

  .calendar-toolbar {
    gap: 8px;
    padding: 0 4px 18px;
  }

  .calendar-toolbar__title {
    min-width: 118px;
  }

  .calendar-toolbar__title h3 {
    font-size: 14px;
  }

  .month-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 12px;
  }

  .month-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .month-button svg {
    width: 17px;
    height: 17px;
  }

  .calendar-grid {
    border-spacing: 3px;
  }

  .calendar-grid th {
    height: 34px;
    padding-bottom: 6px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-day {
    height: clamp(40px, 12vw, 54px);
    border-radius: 11px;
    font-size: 12px;
  }

  .calendar-day--today::after {
    bottom: 5px;
  }

  .occasions-panel__header {
    padding: 20px;
  }

  .occasion-list {
    padding-right: 16px;
    padding-left: 16px;
  }

  .site-footer {
    width: calc(100% - 32px);
    padding-bottom: 30px;
  }
}

@media (max-width: 420px) {
  .site-header__status {
    display: none;
  }

  .date-card {
    min-height: 132px;
    padding: 13px;
  }

  .date-card__label {
    font-size: 10px;
  }

  .date-card__index {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .date-card__date {
    font-size: 11px;
    line-height: 1.6;
  }

  .quote-card {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 3px 9px;
  }

  .quote-card__mark {
    font-size: 35px;
  }

  .calendar-section {
    width: calc(100% - 20px);
  }

  .calendar-grid {
    border-spacing: 2px;
  }

  .calendar-grid th {
    font-size: 7px;
  }

  .calendar-day {
    height: 38px;
    border-radius: 9px;
    font-size: 11px;
  }

  .site-footer > p {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .site-footer,
  .month-button,
  .section-heading > p {
    display: none;
  }

  .hero {
    color: #111;
    background: #fff;
    box-shadow: none;
  }

  .date-card,
  .quote-card,
  .panel {
    border: 1px solid #ccc;
    color: #111;
    background: #fff;
    box-shadow: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
