.guide-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.6rem;
  max-width: 63rem;
}
.guide-masthead a { display: inline-flex; align-items: center; min-height: 48px; font-size: .9rem; }
.guide-page {
  --guide-gold: var(--on-dark-accent);
  max-width: 63rem;
  margin-block: 1.6rem 4rem;
}
.guide-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  color: var(--muted);
  margin-block-end: .55rem;
  font-size: .9rem;
}
.guide-top-loading, .guide-loading .guide-top-label { display: none; }
.guide-loading .guide-top-loading { display: inline; }
.guide-top::after {
  position: absolute;
  content: "";
  inset-inline: 0;
  inset-block-end: -.4rem;
  height: 3px;
  border-radius: 1em;
  background: var(--accent);
  opacity: 0;
}
.guide-loading .guide-top::after { animation: guide-wait .9s infinite alternate; }
@keyframes guide-wait {
  from { transform: scaleX(.12); opacity: .45; }
  to { transform: scaleX(1); opacity: 1; }
}
.guide-panel {
  padding: clamp(1.1rem, 4vw, 3.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}
.guide-panel-home {
  background: var(--strong);
  border-color: var(--strong);
  color: var(--surface);
}
.guide-heading > p { color: var(--muted); margin-block: .65rem .8rem; }
.guide-panel-home .guide-heading > p { color: var(--guide-gold); }
.guide-round-intro .guide-icon { margin-block-end: .75rem; }
.guide-intro-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.guide-result-loading:not([hidden]) {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .8rem;
  min-block-size: 13rem;
  text-align: center;
}
.guide-panel h1 { font-size: clamp(1.55rem, 4vw, 2.65rem); text-wrap: balance; }
.guide-panel h2 { font-size: clamp(1.1rem, 3vw, 1.5rem); }
.guide-panel h1:focus { outline: none; }
.guide-courses { display: grid; gap: .75rem; margin-block-start: 1.3rem; }
.guide-courses { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.guide-profile-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-block-start: 1.25rem; }
.guide-profile-options .guide-course-tile { display: flex; align-items: center; min-block-size: 3.65rem; }
.guide-track-picker-actions { margin-block-start: .8rem; }
.guide-track-picker-actions svg, .guide-plan-assessment svg { inline-size: 1.2rem; block-size: 1.2rem; }
.guide-track-picker-actions .guide-secondary, .guide-plan-assessment .guide-secondary { gap: .4rem; }
.guide-tile {
  display: grid;
  align-content: start;
  gap: .48rem;
  width: 100%;
  height: 100%;
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.guide-tile:hover, button.guide-choice:hover { background: var(--tint); border-color: var(--accent); }
.guide-tile > strong { font: 700 1.05rem/1.65 var(--font-title); }
.guide-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.65rem;
  height: 2.65rem;
  color: var(--accent);
  background: var(--tint);
  border-radius: var(--radius-panel);
}
.guide-icon svg { display: block; place-self: center; inline-size: 1.4rem; block-size: 1.4rem; margin: 0; }
.guide-course-tile { min-height: 6.4rem; }
.guide-round { max-width: 42rem; margin-inline: auto; }
.guide-round .guide-heading { margin-block: 1rem; }
.guide-round .guide-heading:has(+ .guide-options) h1 { font-size: clamp(1.25rem, 3vw, 1.8rem); }
.guide-progress-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; font-weight: 700; color: var(--accent); }
.guide-progress { display: block; width: 100%; height: .45rem; margin-block-start: .3rem; border: 0; border-radius: 1rem; appearance: none; background: var(--tint); overflow: hidden; }
.guide-progress::-webkit-progress-bar { background: var(--tint); }
.guide-progress::-webkit-progress-value { background: var(--accent); border-radius: 1rem; }
.guide-progress::-moz-progress-bar { background: var(--accent); border-radius: 1rem; }
.guide-kicker { display: block; font-size: .9rem; color: var(--accent); font-weight: 700; margin-block-end: .4rem; }
.guide-options { display: grid; gap: .55rem; margin-block: 1rem; }
.guide-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  min-height: 52px;
  width: 100%;
  padding: .66rem .8rem;
  text-align: start;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  font: inherit;
}
button.guide-choice { cursor: pointer; }
.guide-choice:disabled:not(.is-correct):not(.is-incorrect) { cursor: wait; }
.guide-choice.is-correct { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.guide-choice.is-incorrect { background: var(--error-soft); color: var(--error); border-color: var(--error-border); }
.guide-mark { flex: none; font-weight: 700; }
.guide-next { display: flex; justify-content: end; margin-block-start: 1.1rem; }
.guide-next[hidden] { display: none; }
.guide-passage { padding: .7rem; border: 1px solid var(--border); border-radius: var(--radius-card); }
.guide-passage summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.guide-primary, .guide-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius-card);
  border: 1px solid var(--accent);
  padding: .5rem 1rem;
  font: 700 1rem/1.6 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.guide-primary { background: var(--accent); color: white; }
.guide-primary:hover { background: var(--strong); color: white; }
.guide-secondary { background: var(--surface); color: var(--strong); }
.guide-secondary:hover { background: var(--tint); }
.guide-score { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.guide-score strong { border-radius: var(--radius-card); padding: .2rem .65rem; background: var(--tint); color: var(--strong); font-size: 1.3rem; }
.guide-sequence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .2rem; padding: .8rem 0; margin: 1rem 0; border-block: 1px solid var(--border); list-style: none; }
.guide-sequence li { display: grid; justify-items: center; text-align: center; gap: .35rem; font-size: .88rem; }
.guide-sequence li:nth-child(2) .guide-icon { animation-delay: 70ms; }
.guide-sequence li:nth-child(3) .guide-icon { animation-delay: 140ms; }
.guide-reward { background: var(--paper); border: 1px solid var(--border); border-radius: 1rem; padding: .9rem; }
.guide-choice-with-icon { justify-content: start; }
.guide-choice-with-icon .guide-icon, .guide-track-insight .guide-icon, .guide-track-name .guide-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-card);
}
.guide-choice-with-icon .guide-icon svg, .guide-track-insight .guide-icon svg, .guide-track-name .guide-icon svg {
  inline-size: 1.1rem;
  block-size: 1.1rem;
}
.guide-track-insight {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-block: 1rem;
  padding: .65rem;
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--tint);
  color: var(--strong);
  font-size: .9rem;
}
.guide-track-insight .guide-icon { background: var(--surface); }
.guide-fit-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-block: 1.25rem .65rem; }
.guide-fit-table :is(th, td) { text-align: start; vertical-align: top; padding: .75rem .45rem; border-block-end: 1px solid var(--line, var(--border)); }
.guide-fit-table thead { background: var(--tint); color: var(--accent); }
.guide-fit-table thead th { font-size: .84rem; }
.guide-fit-table thead th:last-child { width: clamp(6.25rem, 28%, 11rem); }
.guide-track-name { display: flex; align-items: center; gap: .5rem; min-block-size: 44px; font-weight: 700; line-height: 1.55; }
.guide-fit-table small { display: block; margin-block-start: .2rem; color: var(--muted); font-weight: 400; line-height: 1.6; }
.guide-fit-table td strong { color: var(--accent); }
.guide-fit-meter { display: block; width: 100%; height: .55rem; margin-block-start: .25rem; border: 0; border-radius: 1rem; overflow: hidden; background: var(--tint); }
.guide-fit-meter::-webkit-meter-bar { border: 0; border-radius: 1rem; background: var(--tint); }
.guide-fit-meter::-webkit-meter-optimum-value { border-radius: 1rem; background: var(--accent); }
.guide-fit-meter::-moz-meter-bar { border-radius: 1rem; background: var(--accent); }
.guide-track-note { color: var(--muted); font-size: .88rem; }
.guide-track-links { display: flex; flex-wrap: wrap; gap: 0 1rem; margin-block: .4rem .85rem; }
.guide-track-links a { display: inline-flex; min-block-size: 44px; align-items: center; gap: .35rem; font-size: .9rem; }
.guide-track-links svg, .guide-track-study .guide-primary svg { inline-size: 1.15rem; block-size: 1.15rem; flex: none; }
.guide-track-study { margin-block-start: 1rem; padding: .9rem; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--paper); }
.guide-profile-summary, .guide-track-selection {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-block: .75rem 1.1rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--paper);
}
.guide-profile-summary p, .guide-plan-assessment p { margin-block: .25rem .5rem; color: var(--muted); }
.guide-profile-need { display: block; color: var(--muted); font-size: .88rem; }
.guide-plan-assessment { margin-block-start: 1.4rem; padding-block-start: 1rem; border-block-start: 1px solid var(--border); }
.guide-text-action { min-block-size: 44px; padding-inline: .5rem; border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; font: inherit; cursor: pointer; }
.guide-track-study-content { display: flex; align-items: flex-start; gap: .75rem; }
.guide-track-study-content > div { min-inline-size: 0; }
.guide-track-study h2 { margin-block-end: .3rem; }
.guide-track-study .guide-primary { gap: .4rem; }
.guide-track-coefficients { display: flex; flex-wrap: wrap; gap: .35rem; margin: .7rem 0; padding: 0; list-style: none; }
.guide-track-coefficients li { padding: .18rem .45rem; border-radius: .35rem; background: var(--tint); color: var(--strong); font-size: .77rem; }
.guide-reading-signup { display: flex; justify-content: center; margin-block: 1rem; }
.guide-reading-signup .guide-primary { gap: .5rem; }
.guide-reading-signup svg { flex: none; inline-size: 1.25rem; block-size: 1.25rem; }
.guide-reward { display: flex; align-items: start; gap: .7rem; margin-block: 1.15rem; border-color: #d2b979; background: #faf2de; }
.guide-reward .guide-icon { background: #f1dfad; }
.guide-code { display: inline-block; padding: .22rem .5rem; margin-block: .4rem .7rem; border: 1px dashed #8d7544; border-radius: var(--radius-control); font-size: .9rem; overflow-wrap: anywhere; }
.guide-reward p { margin-block: .25rem; }
.guide-exit { display: inline-flex; align-items: center; min-height: 48px; }
.guide-back { display: flex; width: fit-content; margin-block-start: .55rem; }
.guide-invite { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .75rem .9rem; border: 1px solid var(--border); background: var(--tint); border-radius: var(--radius-panel); margin-block: .8rem; }
.guide-invite-copy { display: flex; align-items: center; gap: .7rem; flex: 1 1 18rem; }
.guide-invite .guide-icon { background: var(--surface); }
.guide-invite p { color: var(--muted); }
.guide-invite-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-block-size: 48px;
  padding: .35rem .6rem .35rem .85rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.guide-invite-start:is(:hover, :focus-visible) { background: var(--strong); color: var(--surface); }
.guide-invite-arrow {
  display: grid;
  place-items: center;
  inline-size: 1.8rem;
  block-size: 1.8rem;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-size: 1.12rem;
  line-height: 1;
}
.guide-dismiss { width: 48px; height: 48px; background: transparent; border: 0; color: var(--accent); font: 1.6rem/1 var(--font-body); cursor: pointer; }
@media (max-width: 36rem) {
  .guide-invite { flex-wrap: nowrap; gap: .4rem; padding: .45rem .55rem; }
  .guide-invite-copy { flex: 1; min-inline-size: 0; font-size: .85rem; line-height: 1.55; }
  .guide-invite-copy .guide-icon, .guide-invite-copy p, .guide-invite-arrow { display: none; }
  .guide-invite-start { min-block-size: 44px; padding-inline: .55rem; font-size: .8rem; }
  .guide-dismiss { inline-size: 44px; block-size: 44px; }
}
.guide-error { color: var(--error); padding-block: .4rem; }
.guide-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 44rem) {
  .guide-page { width: calc(100% - 1.2rem); margin-block-start: .65rem; }
  .guide-profile-options { grid-template-columns: 1fr; }
  .guide-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-next > button { width: 100%; }
}
@media (min-width: 56rem) and (min-height: 40rem) {
  html:has(#study-guide):not(:has(.guide-screen-result)) { overflow: hidden; }
  body:has(#study-guide):not(:has(.guide-screen-result)) { min-block-size: 0; block-size: 100dvh; overflow: hidden; }
  body:has(#study-guide):not(:has(.guide-screen-result)) #main { display: flex; min-block-size: 0; }
  .guide-page:not(:has(.guide-screen-result)) { display: flex; flex-direction: column; margin-block: .65rem 1rem; }
  .guide-page:not(:has(.guide-screen-result)) .guide-top { flex: none; }
  .guide-page:not(:has(.guide-screen-result)) #guide-panel { min-block-size: 0; overflow: auto; }
  .guide-panel:not(.guide-screen-result) { padding: clamp(1rem, 3.2vh, 2rem) clamp(1rem, 3vw, 2.25rem); }
  .guide-panel:not(.guide-screen-result) h1 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
  .guide-courses, .guide-profile-options { margin-block-start: .7rem; gap: .5rem; }
  .guide-course-tile { display: flex; align-items: center; gap: .55rem; min-block-size: 3.4rem; padding: .5rem; }
  .guide-course-tile strong { font-size: .9rem; line-height: 1.55; }
  .guide-course-tile .guide-icon { inline-size: 2rem; block-size: 2rem; border-radius: var(--radius-card); }
  .guide-course-tile .guide-icon svg { inline-size: 1.1rem; block-size: 1.1rem; }
  .guide-passage[open] { max-block-size: 23vh; overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-loading .guide-top::after { animation: none; opacity: 1; }
  }

.guide-journey {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-block: .9rem 1rem;
}
.guide-journey-progress { flex: 1; min-inline-size: 0; }
.guide-journey-progress .guide-progress { margin: 0; }
.guide-previous {
  display: grid;
  place-items: center;
  inline-size: 2.8rem;
  block-size: 2.8rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface);
  cursor: pointer;
}
.guide-previous:hover { background: var(--tint); border-color: var(--accent); }
.guide-previous span { font-size: 1.4rem; line-height: 1; }
.guide-plan-form { display: grid; justify-items: start; gap: 1.15rem; margin-block-start: 1.1rem; }
.guide-fields { display: grid; gap: 1rem; inline-size: 100%; }
.guide-plan-form label { display: grid; gap: .35rem; inline-size: 100%; font-weight: 700; }
.guide-plan-form select {
  inline-size: 100%;
  min-block-size: 2.9rem;
  padding: .6rem .8rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 400;
}
.guide-plan-tracks { display: flex; flex-wrap: wrap; gap: .35rem; margin: .35rem 0 1rem; padding: 0; list-style: none; }
.guide-plan-tracks li, .guide-priority-tag {
  padding: .22rem .58rem;
  border-radius: var(--radius-control);
  background: var(--tint);
  color: var(--accent);
  font-size: .82rem;
}
.guide-plan-subjects { margin-block-start: 1rem; }
.guide-plan-subjects .guide-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.guide-plan-subjects small, .study-report small { display: block; color: var(--muted); line-height: 1.65; }
.study-report { display: grid; gap: clamp(1.3rem, 3vw, 2.25rem); }
.study-report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 28%);
  align-items: center;
  gap: 1.4rem;
  padding: clamp(1rem, 3.2vw, 2.5rem);
  border-radius: var(--radius-panel);
  background: var(--strong);
  color: var(--surface);
}
.study-report-hero p { color: var(--on-dark-muted); margin: .55rem 0 0; max-width: 62ch; }
.study-report-time { display: grid; gap: .2rem; padding-inline-start: 1.1rem; border-inline-start: 1px solid var(--on-dark-border); }
.study-report-time strong { font: 700 clamp(1.75rem, 4vw, 2.85rem)/1.35 var(--font-title); color: var(--on-dark-accent); }
.study-report-time span { font-size: .86rem; color: var(--on-dark-muted); }
.study-report-start { display: flex; gap: .85rem; padding: clamp(.85rem, 3vw, 1.6rem); background: var(--hero); border-radius: var(--radius-panel); }
.study-report-start .guide-kicker { color: var(--accent); margin: 0 0 .2rem; }
.study-report-start p { margin: .4rem 0 .85rem; color: var(--muted); }
.study-report-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); }
.study-report-grid h2 + p { color: var(--muted); margin: .4rem 0 .85rem; }
.study-report-priorities { margin: 0; padding: 0; list-style: none; counter-reset: study-priority; }
.study-report-priorities li {
  counter-increment: study-priority;
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .45rem;
  padding: .65rem .5rem;
  border-block-end: 1px solid var(--border);
}
.study-report-priorities li::before { content: counter(study-priority, persian); color: var(--muted); }
.study-report-priorities li > span { color: var(--muted); font-size: .82rem; }
.study-report-priorities .study-report-focus { background: var(--hero); }
.study-report-focus a, .study-report-priorities .study-report-focus > span { color: var(--accent); font-weight: 700; }
.study-report-tracks {
  align-self: start;
  display: grid;
  gap: .6rem;
  padding: clamp(.85rem, 3vw, 1.25rem);
  background: var(--hero);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
}
.study-report-tracks > h2 { margin: 0; color: var(--muted); font: 700 .9rem/1.6 var(--font-body); }
.study-report-track + .study-report-track { border-block-start: 1px solid var(--border); padding-block-start: .6rem; }
.study-report-track-link, .study-report-coefficients {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-block-size: 44px;
  color: var(--accent);
  text-decoration: none;
}
.study-report-track-link { font: 700 1.15rem/1.5 var(--font-title); }
.study-report-track-link .guide-icon { flex: none; inline-size: 2.25rem; block-size: 2.25rem; background: var(--surface); }
.study-report-track-link .guide-icon svg { inline-size: 1.2rem; block-size: 1.2rem; }
.study-report-track-fit { padding-inline-start: 2.9rem; }
.study-report-track p { margin: .15rem 0 0; color: var(--muted); font-size: .87rem; }
.study-report-track .guide-fit-meter { inline-size: 100%; }
.study-report-coefficients { border-block-start: 1px solid var(--border); padding-block-start: .35rem; font-size: .9rem; }
.study-report-coefficients svg { flex: none; inline-size: 1.1rem; block-size: 1.1rem; margin-inline: .575rem; }
.study-report-track-link:hover span:last-child, .study-report-coefficients:hover span { text-decoration: underline; }
@media (max-width: 42rem) {
  .study-report-hero, .study-report-grid { grid-template-columns: 1fr; }
  .study-report-time { padding-inline-start: 0; padding-block-start: .65rem; border-inline-start: 0; border-block-start: 1px solid var(--on-dark-border); }
  .guide-plan-subjects .guide-choice { grid-template-columns: auto minmax(0, 1fr); }
  .guide-priority-tag { grid-column: 2; justify-self: start; }
}

.guide-exam-timing {
  margin-block: .8rem;
  padding: .8rem 1rem;
  border-inline-start: .22rem solid var(--accent);
  border-radius: var(--radius-control);
  background: var(--hero);
}
.guide-exam-timing p { margin: .25rem 0 0; color: var(--muted); }

.study-report-month > p { color: var(--muted); margin: .4rem 0 1rem; max-width: 72ch; }
.study-report-weeks { display: grid; gap: .5rem; }
.study-report-weeks span { color: var(--accent); font-size: .85rem; font-weight: 700; }
.study-report-weeks h3 { margin: .25rem 0; }
.study-report-weeks p { margin: 0; color: var(--muted); font-size: .9rem; }
.study-report-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.study-report-nav a { display: inline-flex; align-items: center; min-block-size: 44px; }
.study-report-scope { color: var(--muted); font-size: .86rem; margin-block-end: .85rem; }
.study-report-weeks details { border: 1px solid var(--border); border-radius: var(--radius-control); }
.study-report-weeks details > p { padding: .25rem .85rem .75rem; }
.study-report-weeks summary { padding: .7rem .85rem; cursor: pointer; }
.study-report-days { list-style: none; padding: 0 .85rem; margin: 0; }
.study-report-days li { border-block-start: 1px solid var(--border); padding-block: .7rem; }
.study-report-days dl { margin: 0; }
.study-report-days dl > div { display: grid; grid-template-columns: 3.8rem minmax(0, 1fr); gap: .4rem; margin-block: .35rem; }
.study-report-days dt { font-weight: 700; }
.study-report-days dd { margin: 0; }
