.guided { min-width: 0; max-width: 100%; margin-bottom: 1.4rem; }
.guided h2 { margin-top: .35rem; font-size: clamp(1.45rem, 4vw, 2rem); letter-spacing: -.04em; font-weight: 560; }
.guided-steps { list-style: none; margin: .8rem 0 0; padding: 0; min-width: 0; }
.guided-card {
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: .9rem;
  margin-top: .75rem;
  min-width: 0;
  max-width: 100%;
}
.guided-card h3 { margin-top: .2rem; font-size: 1.15rem; letter-spacing: -.03em; font-weight: 600; }
.guided-card p { margin-top: .45rem; line-height: 1.45; }
.guided-next { background: #f3f4f8; }
.guided-next .btn { opacity: .7; cursor: not-allowed; }
.guided .field input,
.guided .field select,
.guided-point input,
.guided-point select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 2.75rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid #8a8476;
  border-radius: .55rem;
  padding: .45rem .6rem;
  background: #fff;
  color: var(--ink);
}
.guided .btn { width: 100%; margin-top: .7rem; }
.guided-point {
  display: grid;
  gap: .45rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.guided-point label,
.guided .field span { font-weight: 700; font-size: .85rem; }
.guided-point label { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.guided-meta { display: grid; gap: .55rem; margin-top: .7rem; }
.guided-status { min-height: 1.2rem; }
.is-working [data-work-label] { font-weight: 600; }
.is-working [data-work-detail] { display: block; margin-top: .35rem; color: var(--mute); }
.is-working progress { display: block; width: 100%; height: .45rem; margin-top: .65rem; accent-color: var(--lime); }
.work-dots { display: inline-flex; gap: .2rem; margin-right: .6rem; vertical-align: middle; }
.work-dots i { display: block; width: .35rem; height: .35rem; border-radius: 50%; background: currentColor; animation: assistant-dot 1.2s ease-in-out infinite; }
.work-dots i:nth-child(2) { animation-delay: .16s; }
.work-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes assistant-dot { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-.18rem); } }
@media (prefers-reduced-motion: reduce) { .work-dots i { animation: none; opacity: .7; } }
.guided-file { margin-top: .7rem; }
.guided-file input { max-width: 100%; }

.guided-point textarea,
.guided-proposal textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #8a8476;
  border-radius: .55rem;
  padding: .55rem .65rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  box-sizing: border-box;
}
.guided-proposal { min-width: 0; margin-block: .8rem; }
.guided-proposal [name="solutionLatex"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.guided-inventory { padding-left: 1.5rem; }
.guided-inventory li { margin-block: .6rem; overflow-wrap: anywhere; }
.guided-inventory p { margin-block: .3rem; }
.guided-warning { color: #873f09; background: #fff4db; padding: .65rem; border-radius: .5rem; overflow-wrap: anywhere; }
.guided-proposal .field { display: block; }
.guided-proposal .field > span { display: block; margin-bottom: .4rem; }

.guided-point-summary { display: block; border: 1px solid var(--line); border-radius: .65rem; padding: .8rem; margin-top: 0; }
.guided-point-summary h4 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; margin: 0 0 .6rem; font-size: 1rem; }
.guided-point-summary h4 span { color: var(--mute); font-weight: 500; }
.guided-point-summary dl { margin: 0; }
.guided-point-summary dt { margin-top: .6rem; font-weight: 700; font-size: .9rem; }
.guided-point-summary dd { margin: .2rem 0 0; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.guided-math { display: inline-block; max-width: 100%; overflow-x: auto; vertical-align: middle; white-space: normal; padding-block: .12em; }
.guided-math math { font-size: 1.08em; }
.guided-math-display { display: block; margin-block: .45rem; }
.guided-latex { margin-block: .7rem; }
.guided-latex summary { cursor: pointer; padding-block: .5rem; font-weight: 700; }
.guided-latex textarea { margin-top: .4rem; }
.guided-rows:has(.guided-point-summary) { display: grid; gap: .75rem; }
.assistant-card[data-action="reviewProposal"] { max-width: 100%; }
@media (min-width: 900px) {
  .guided-rows:has(.guided-point-summary) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A visible route from preparation to the teacher's final review. */
.guided-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.2rem; }
.guided-intro { max-width: 52rem; }
.guided-intro h2 { max-width: 26ch; font-size: clamp(1.7rem, 4vw, 2.55rem); line-height: 1.12; margin-bottom: .75rem; }
.guided-intro > p { line-height: 1.65; color: var(--mute); max-width: 68ch; }
.guided-checklist { display: grid; gap: .3rem; border-left: 3px solid var(--lime); padding: .55rem .9rem; margin: 1.1rem 0 1.4rem; line-height: 1.5; }
.guided-checklist span { color: var(--mute); }
.guided-progress { background: var(--card); border: 1px solid var(--line); border-radius: .9rem; padding: 1rem; }
.guided-progress-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; font-size: .9rem; }
.guided-progress-heading > span { color: var(--mute); }
.guided-roadmap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.guided-roadmap li { min-width: 0; }
.guided-roadmap button { display: flex; align-items: flex-start; gap: .5rem; text-align: left; border: 1px solid transparent; border-radius: .6rem; background: #f4f4f1; color: var(--ink); padding: .7rem .55rem; width: 100%; min-height: 4.75rem; font: inherit; font-size: .85rem; line-height: 1.35; cursor: pointer; }
.guided-roadmap button:disabled { cursor: default; color: #696962; }
.guided-roadmap .is-current button { border-color: #6c8040; background: #f5f9e8; }
.guided-roadmap small { display: block; margin-top: .25rem; font-size: .75rem; color: var(--mute); }
.guided-step-number { flex: 0 0 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: #e6e6de; font-size: .8rem; font-weight: 700; }
.is-current .guided-step-number, .is-complete .guided-step-number { background: var(--ink); color: var(--lime); }
.guided-direction { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; background: #f3f5ec; border-radius: .7rem; margin-top: .8rem; padding: .85rem 1rem; line-height: 1.5; }
.guided-direction strong { font-size: .95rem; font-weight: 550; }
.guided-direction button { flex-shrink: 0; border: 0; background: transparent; font: inherit; cursor: pointer; padding: .3rem 0; }
.guided-card { padding: clamp(1rem, 3vw, 1.5rem); scroll-margin-top: 1rem; }
.guided-card.is-current { border-color: #88975c; }
.guided-card h3 { font-size: 1.3rem; }
.guided-card > p:not(.kicker) { max-width: 75ch; }
.guided-card .field { display: flex; flex-direction: column; gap: .4rem; margin-top: .8rem; }
.guided-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.guided-form-grid[hidden] { display: none; }
.guided-first-class { background: #f3f5ec; border-radius: .65rem; padding: 1rem; margin: 1rem 0; line-height: 1.5; }
.guided-first-class strong { display: block; }
.guided-prerequisite { font-size: .9rem; color: var(--mute); line-height: 1.55; }
.guided-alternative, .guided-advanced { padding: .85rem 0; margin-top: .8rem; border-top: 1px solid var(--line); }
.guided-alternative summary, .guided-advanced summary { font-weight: 600; cursor: pointer; min-height: 1.5rem; }
.guided .guided-roadmap button:focus-visible, .guided .text-link:focus-visible, .guided summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.guided h3:focus { outline: none; }
.guided-status:empty, .guided-direction:empty { display: none; }

/* Shared by guided setup and the assistant; motion is activity, not completion. */
.work-brand { display: inline-grid; place-items: center; width: 2.55rem; height: 2.55rem; padding: .3rem; margin-right: .7rem; margin-bottom: .3rem; border-radius: .75rem; background: var(--ink); position: relative; vertical-align: middle; }
.work-brand img { display: block; width: 1.75rem; height: 1.75rem; object-fit: contain; animation: work-brand-breathe 2.1s ease-in-out infinite; }
.work-brand::after { content: ""; position: absolute; inset: -.25rem; border: 2px solid transparent; border-top-color: #738e3c; border-right-color: #c6d788; border-radius: 1rem; animation: work-brand-orbit 3.2s linear infinite; }
@keyframes work-brand-breathe { 0%, 100% { opacity: .75; transform: scale(.93); } 50% { opacity: 1; transform: scale(1); } }
@keyframes work-brand-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .work-brand img, .work-brand::after { animation: none; opacity: 1; transform: none; } }
@media (min-width: 650px) { .guided-card > .btn, .guided-alternative > .btn { width: auto; min-width: 13rem; } }
@media (max-width: 760px) {
  .guided-roadmap { grid-template-columns: 1fr; gap: .35rem; }
  .guided-roadmap button { min-height: 2.75rem; align-items: center; padding: .55rem .65rem; }
  .guided-roadmap button > span:last-child { display: flex; flex: 1; justify-content: space-between; align-items: baseline; gap: .6rem; }
  .guided-roadmap small { margin: 0; text-align: right; }
  .guided-direction { flex-direction: column; gap: .25rem; }
  .guided-form-grid { grid-template-columns: 1fr; gap: 0; }
}
