:root {
  --paper: #f3ebd8;
  --paper-deep: #e8d7b8;
  --card: #fff8ec;
  --ink: #241c15;
  --muted: #6d5848;
  --line: #ddcba8;
  --stamp: #b23a24;
  --stamp-soft: #f3d2c6;
  --forest: #1e4a3c;
  --forest-soft: #d7e4dc;
  --gold: #c6a15b;
  --brass: #b08948;
  --shadow: 0 10px 30px rgba(36, 28, 21, 0.08);
  --display: "Fraunces", "Palatino Linotype", Palatino, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  background:
    radial-gradient(circle at 12% 8%, rgba(198, 161, 91, 0.18), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(30, 74, 60, 0.1), transparent 24%),
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      rgba(221, 203, 168, 0.35) 32px
    ),
    var(--paper);
}

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

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--card);
  padding: 0.6rem 1rem;
  z-index: 20;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 235, 216, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.progress-block {
  flex: 1;
  max-width: 360px;
}

.lang-switch {
  display: flex;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.lang-switch button.active {
  background: var(--forest);
  color: #fff;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.progress {
  height: 10px;
  background: var(--paper-deep);
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--forest), #3d7a64);
  border-radius: inherit;
  transition: width 240ms ease;
}

.hero,
.panel,
.day,
.later,
.rules {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem auto 2rem;
  padding: 1rem;
}

.hero-art {
  position: relative;
}

.hero-art img,
.frame img,
.day-art img,
.outcome img,
.honest img {
  width: 100%;
  border-radius: 20px;
  background: var(--paper);
}

.pin {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3e0b0, var(--brass) 55%, #7a5a22);
  box-shadow: 0 2px 0 #7a5a22;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.kicker {
  color: var(--stamp);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 0.6rem;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.15;
  margin: 0 0 0.7rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.hero-copy {
  padding: 0.5rem 0.75rem 1rem;
}

.learner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin: 1rem 0 1.25rem;
}

.learner label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.learner input,
.field input,
.field textarea,
.score input {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  min-width: 0;
}

::placeholder {
  color: #b39d86;
  opacity: 1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: var(--forest-soft);
  color: var(--forest);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.92rem;
}

.honest {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
}

.honest-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 20px;
}

.honest-card.no {
  background: var(--stamp-soft);
}

.honest-card.yes {
  background: var(--forest-soft);
}

.honest-card h2 {
  font-size: 1.35rem;
}

.honest-card p {
  margin: 0;
}

.section-head {
  margin: 0 0 1rem;
}

.outcomes {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.outcome {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.outcome img {
  border-radius: 0;
  aspect-ratio: 1;
  object-fit: cover;
}

.outcome div {
  padding: 1rem 1.1rem 1.2rem;
}

.outcome strong {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.outcome p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.panel {
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.timetable {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.timetable li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem;
  align-items: center;
  background: var(--paper);
  border-radius: 16px;
  padding: 0.8rem 1rem;
}

.timetable time {
  font-weight: 700;
  color: var(--forest);
}

.timetable small {
  display: block;
  color: var(--muted);
}

.hours-note {
  margin: 1rem 0 0;
  font-weight: 700;
}

.week-map {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.week-map a {
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem 0.4rem;
  text-align: center;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 0.15rem;
}

.week-map a.today {
  outline: 3px solid var(--gold);
}

.week-map a.done {
  background: var(--forest-soft);
}

.week-map b {
  display: block;
  font-family: var(--display);
  color: var(--stamp);
}

.week-map span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.day {
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.day-summary {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  cursor: pointer;
}

.day-art {
  position: relative;
}

.day-art img {
  aspect-ratio: 1;
  object-fit: cover;
}

.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  height: 2.2rem;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  border-radius: 8px;
  font-family: var(--display);
  font-weight: 700;
  transform: rotate(-6deg);
  margin-bottom: 0.4rem;
}

.day-summary p {
  margin: 0;
  color: var(--muted);
}

.chevron {
  width: 1.6rem;
  height: 1.6rem;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(45deg);
  justify-self: end;
  margin-right: 0.4rem;
}

.day.open .chevron {
  transform: rotate(-135deg);
  margin-top: 0.5rem;
}

.day-body {
  display: none;
  padding: 0 1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.day.open .day-body {
  display: block;
}

.plain {
  background: var(--paper);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}

.block {
  margin: 1.25rem 0;
}

.when {
  color: var(--forest);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.7rem;
  align-items: start;
  border-bottom: 1px dashed var(--line);
}

.task-row:last-child {
  border-bottom: 0;
}

.task {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem 0.2rem;
  border-bottom: 0;
}

.watch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--stamp);
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  background: #fff;
}

.watch:hover,
.watch:focus-visible {
  border-color: var(--stamp);
  background: var(--stamp-soft);
}

.study-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
  margin: 0.35rem 0;
}

.study-line .watch {
  margin-top: 0;
}

.task input {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  accent-color: var(--forest);
}

.task.done span {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.choices {
  display: grid;
  gap: 0.6rem;
}

.choice {
  text-align: left;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  cursor: pointer;
}

.choice.selected {
  border-color: var(--forest);
  background: var(--forest-soft);
}

.choice b {
  display: block;
  margin-bottom: 0.2rem;
}

.choice span {
  color: var(--muted);
  font-size: 0.95rem;
}

.warn {
  background: #fff4e5;
  border-left: 5px solid var(--gold);
  padding: 0.9rem 1rem;
  border-radius: 12px;
}

.formula {
  background: var(--ink);
  color: var(--card);
  border-radius: 18px;
  padding: 1rem;
}

.formula .row {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.formula input {
  width: 100%;
}

.preview {
  margin-top: 0.8rem;
  font-family: var(--display);
  font-size: 1.2rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.6rem;
  text-align: left;
  font-size: 0.95rem;
  vertical-align: top;
}

th {
  background: var(--paper);
}

td input,
td textarea {
  width: 100%;
  border: 0;
  padding: 0.2rem;
  background: transparent;
  resize: vertical;
}

.deliverables {
  background: var(--forest-soft);
  border-radius: 16px;
  padding: 1rem;
}

.widget {
  background: var(--paper);
  border-radius: 16px;
  padding: 1rem;
  margin: 1rem 0;
}

.price-out {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.price-out div {
  background: #fff;
  border-radius: 12px;
  padding: 0.8rem;
}

.price-out b {
  display: block;
  font-size: 1.4rem;
  font-family: var(--display);
}

.copy-list {
  display: grid;
  gap: 0.75rem;
}

.copy-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
}

.copy-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.copy-card button {
  border: 0;
  background: var(--forest);
  color: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.copy-card p {
  margin: 0;
  color: var(--muted);
}

.scores {
  display: grid;
  gap: 0.5rem;
}

.score {
  display: grid;
  grid-template-columns: 1fr 5.5rem auto;
  gap: 0.5rem;
  align-items: center;
}

.score output {
  font-weight: 700;
}

.score.pass output {
  color: var(--forest);
}

.score.fail output {
  color: var(--stamp);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.ghost,
.primary {
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.primary {
  background: var(--forest);
  color: #fff;
  border: 0;
}

.later,
.rules {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.lock-grid,
.rule-grid {
  display: grid;
  gap: 0.6rem;
}

.lock,
.rule {
  background: var(--paper);
  border-radius: 14px;
  padding: 0.8rem 1rem;
}

.lock {
  color: var(--muted);
}

.finish {
  text-align: center;
  padding: 2rem 1rem 4rem;
}

.finish blockquote {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 auto;
  max-width: 36rem;
}

footer {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0 0 3rem;
}

html[dir="rtl"] {
  --display: "Vazirmatn", Tahoma, sans-serif;
  --sans: "Vazirmatn", Tahoma, sans-serif;
}

html[dir="rtl"] body {
  font-size: 1.15rem;
  line-height: 1.7;
}

html[dir="rtl"] .kicker,
html[dir="rtl"] .when {
  letter-spacing: 0;
  text-transform: none;
}

html[dir="rtl"] .skip {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .day-summary,
html[dir="rtl"] .choice,
html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}

html[dir="rtl"] .warn {
  border-left: 0;
  border-right: 5px solid var(--gold);
}

html[dir="rtl"] .stamp {
  transform: rotate(6deg);
}

html[dir="rtl"] .chevron {
  justify-self: start;
  margin-right: 0;
  margin-left: 0.4rem;
}

html[dir="rtl"] .copy-card p[lang="en"] {
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  font-size: 1rem;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    padding: 1.25rem;
  }

  .honest {
    grid-template-columns: 1fr 1fr;
    padding: 1.25rem;
  }

  .outcomes {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .formula .row {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 799px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .progress-block {
    max-width: none;
    width: 100%;
  }

  .week-map {
    grid-template-columns: repeat(2, 1fr);
  }

  .day-summary {
    grid-template-columns: 88px 1fr auto;
    gap: 0.7rem;
  }

  .timetable li {
    grid-template-columns: 1fr;
  }

  .honest-card,
  .score {
    grid-template-columns: 1fr;
  }
}

@media print {
  .topbar,
  .actions,
  .chevron,
  .copy-card button {
    display: none !important;
  }

  .day-body,
  .day.open .day-body {
    display: block !important;
  }

  body {
    background: #fff;
  }

  .hero,
  .panel,
  .day,
  .later,
  .rules,
  .outcome {
    box-shadow: none;
    break-inside: avoid;
  }
}
