:root {
  --plum: #4b1259;
  --plum-deep: #2e0b38;
  --plum-soft: #7d338c;
  --saffron: #f2b535;
  --saffron-light: #fff4c6;
  --cream: #f6f1f4;
  --paper: #fffdfb;
  --ink: #35253b;
  --muted: #6b6070;
  --line: #e6dce3;
  --green: #4caa61;
  --green-light: #e9f7eb;
  --mint: #edf9f3;
  --lilac: #faf4ff;
  --shadow: 0 18px 40px rgba(51, 21, 57, 0.1);
}

* { box-sizing: border-box; }

html { background: var(--cream); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(242, 181, 53, 0.72); outline-offset: 3px; }

.site-shell { overflow: hidden; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(113deg, #391044 0%, var(--plum) 52%, #9a408e 100%);
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.32;
  background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 72%);
}

.hero__glow { position: absolute; z-index: -1; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,0.16); border-radius: 50%; }
.hero__glow--left { left: -130px; bottom: -250px; box-shadow: 0 0 0 55px rgba(255,255,255,0.025), 0 0 0 112px rgba(255,255,255,0.025); }
.hero__glow--right { top: -230px; right: 8%; box-shadow: 0 0 0 55px rgba(242,181,53,0.08), 0 0 0 112px rgba(242,181,53,0.035); }

.hero__inner, .progress-card, .planner, .download-panel, .page-footer { width: min(1050px, calc(100% - 40px)); margin-inline: auto; }
.hero__inner { padding: 52px 0 42px; }

.brand-badge { display: inline-flex; gap: 0.45rem; align-items: center; margin: 0 0 13px; padding: 5px 12px; border-radius: 999px; color: #45280a; background: var(--saffron); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.065em; }
.brand-badge span { opacity: 0.6; }

h1, h2, p { margin-top: 0; }
h1 { max-width: 100%; margin-bottom: 9px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.035em; text-wrap: balance; }
h1 span { color: var(--saffron); letter-spacing: 0; }
.hero__schedule { margin-bottom: 12px; color: rgba(255,255,255,0.92); font-size: 1.05rem; }
.hero__context { max-width: 720px; margin-bottom: 28px; color: rgba(255,255,255,0.84); font-size: 0.98rem; }

.stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1.18fr; gap: 10px; }
.stat-card { display: flex; min-height: 91px; padding: 15px 16px; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,0.1); border-radius: 13px; background: rgba(255,255,255,0.14); backdrop-filter: blur(8px); }
.stat-card strong { color: #fff; font-size: 1.8rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.stat-card span { color: rgba(255,255,255,0.78); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.065em; }
.stat-card--highlight { border-color: rgba(242,181,53,0.9); background: var(--saffron); }
.stat-card--highlight strong, .stat-card--highlight span { color: #3a2100; }
.stat-card--location strong { max-width: 160px; font-size: 1.21rem; line-height: 1.04; }

.progress-card { position: relative; z-index: 2; margin-top: -17px; padding: 19px 21px 15px; border: 1px solid rgba(75,18,89,0.07); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.progress-card__heading, .progress-row__labels, .planner__topline, .download-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.progress-card__heading { margin-bottom: 13px; }
.progress-card h2, .planner h2, .download-panel h2 { margin-bottom: 0; font-size: 1.12rem; font-weight: 800; }
.progress-card__tag { color: var(--plum); font-size: 0.82rem; font-weight: 700; }
.progress-row + .progress-row { margin-top: 11px; }
.progress-row__labels { margin-bottom: 5px; color: #4a4050; font-size: 0.83rem; }
.progress-row__labels strong { font-weight: 800; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #eee8eb; }
.progress-fill { display: block; height: 100%; border-radius: inherit; transition: width 240ms ease; }
.progress-fill--studies { background: linear-gradient(90deg, #87438f, var(--plum)); }
.progress-fill--tasks { background: linear-gradient(90deg, #73c666, var(--green)); }
.encouragement { margin: 13px 0 0; color: #368149; font-size: 0.94rem; font-weight: 700; }

.planner { padding: 43px 0 33px; }
.planner__topline { align-items: end; margin-bottom: 15px; }
.eyebrow { margin-bottom: 3px; color: var(--plum-soft); font-size: 0.71rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.planner h2 { font-size: 1.75rem; letter-spacing: -0.02em; }
.view-description { max-width: 300px; margin: 0; color: var(--muted); font-size: 0.93rem; text-align: right; }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,251,0.78); box-shadow: 0 6px 18px rgba(51,21,57,0.04); }
.view-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.view-tab { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 7px 11px; border: 0; border-radius: 9px; color: #65586a; background: transparent; font-size: 0.91rem; font-weight: 700; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.view-tab:hover { color: var(--plum); background: #f5edf6; transform: translateY(-1px); }
.view-tab.is-active { color: #fff; background: var(--plum); box-shadow: 0 5px 12px rgba(75,18,89,0.25); }
.date-control { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); color: #5e515f; font-size: 0.82rem; font-weight: 700; }
.date-control input { min-height: 34px; padding: 4px 7px; border: 1px solid #dbd1d8; border-radius: 8px; color: var(--ink); background: #fff; }
.visible-count { min-height: 20px; margin: 15px 2px 9px; color: var(--muted); font-size: 0.88rem; }

.checklist { display: grid; gap: 10px; }
.schedule-block { overflow: hidden; border: 1px solid #dfc166; border-radius: 14px; background: linear-gradient(110deg, #fffdf2, #fffdfb 75%); box-shadow: 0 8px 20px rgba(94, 72, 0, 0.04); animation: rise 260ms ease both; }
.schedule-block__header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; padding: 13px 15px 5px; }
.schedule-block__header h3 { margin: 0; color: #3e2748; font-size: 1.02rem; font-weight: 800; }
.schedule-block__header p { margin: 0; color: #766877; font-size: 0.78rem; }
.lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 8px 11px 11px; }
.lesson { position: relative; min-height: 111px; padding: 14px; border-radius: 10px; background: var(--lilac); }
.lesson--task { background: var(--mint); }
.lesson__type { display: block; margin-bottom: 4px; color: #806f88; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.055em; text-transform: uppercase; }
.lesson--task .lesson__type { color: #4b8765; }
.lesson h4 { margin: 0 0 10px; color: #392142; font-size: 1rem; line-height: 1.2; }
.status-button { min-width: 108px; padding: 5px 9px; border: 0; border-radius: 999px; color: #6b6070; background: #f1ecef; font-size: 0.74rem; font-weight: 800; text-align: left; transition: transform 180ms ease, background 180ms ease, color 180ms ease; }
.status-button:hover { transform: translateY(-1px); }
.status-button--in-progress { color: #805806; background: #fff1b9; }
.status-button--done { color: #166a38; background: #d9f1df; }
.note-wrap { display: flex; align-items: center; gap: 8px; padding: 0 14px 13px; }
.note-wrap span { font-size: 0.92rem; }
.note-input { width: 100%; min-height: 37px; padding: 7px 10px; border: 1px solid #eadedd; border-radius: 8px; color: var(--ink); background: #fffdfb; font-size: 0.87rem; }
.note-input::placeholder { color: #a69aa6; }

.empty-state { padding: 35px 20px; border: 1px dashed #d4b8d9; border-radius: 14px; color: var(--muted); background: #fcf8fd; text-align: center; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--plum); font-size: 1.05rem; }

.download-panel { margin-bottom: 0; padding: 29px 31px; border-radius: 18px 18px 0 0; color: #fff; background: linear-gradient(110deg, var(--plum-deep), var(--plum)); box-shadow: var(--shadow); }
.download-panel h2 { margin-bottom: 5px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.45rem, 3vw, 2.05rem); font-weight: 600; }
.download-panel p:not(.eyebrow) { max-width: 570px; margin: 0; color: rgba(255,255,255,0.8); }
.eyebrow--gold { color: var(--saffron); }
.download-button { flex: 0 0 auto; padding: 12px 15px; border: 0; border-radius: 10px; color: #3a2100; background: var(--saffron); box-shadow: 0 7px 16px rgba(0,0,0,0.2); font-weight: 800; transition: transform 180ms ease, box-shadow 180ms ease; }
.download-button:hover { box-shadow: 0 10px 22px rgba(0,0,0,0.25); transform: translateY(-2px); }
.page-footer { padding: 16px 0 30px; color: #756979; font-size: 0.86rem; text-align: center; }

@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
  .hero__inner, .progress-card, .planner, .download-panel, .page-footer { width: min(100% - 28px, 1050px); }
  .hero__inner { padding: 36px 0 31px; }
  .hero__schedule, .hero__context { font-size: 0.92rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { min-height: 81px; padding: 13px; }
  .stat-card strong { font-size: 1.55rem; }
  .stat-card--location strong { font-size: 1rem; }
  .progress-card { padding: 16px; }
  .planner { padding-top: 32px; }
  .planner__topline, .download-panel { align-items: flex-start; flex-direction: column; }
  .view-description { max-width: none; text-align: left; }
  .controls { align-items: stretch; flex-direction: column; }
  .date-control { justify-content: space-between; padding: 8px 4px 0; border-top: 1px solid var(--line); border-left: 0; }
  .lesson-grid { grid-template-columns: 1fr; }
  .download-panel { gap: 18px; padding: 25px 20px; }
  .download-button { width: 100%; }
}

@media (max-width: 420px) {
  h1 { font-size: 2.35rem; }
  .view-tab { padding-inline: 8px; font-size: 0.83rem; }
  .schedule-block__header { padding-inline: 12px; }
  .lesson-grid { padding-inline: 8px; }
}

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