/* Brain-friendly helpers for busy faculty and newer AI users. */

.route-intro {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.route-intro img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}
.route-intro h2 {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
}
.route-intro p { margin: .25rem 0; max-width: 780px; }

.start-steps {
  counter-reset: startstep;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0 0;
  padding: 0;
}
.start-steps li {
  position: relative;
  min-height: 105px;
  padding: .9rem .9rem .9rem 3rem;
  border: 1px solid #c8c0b1;
  border-radius: 10px;
  background: var(--cream);
  counter-increment: startstep;
}
.start-steps li::before {
  content: counter(startstep);
  position: absolute;
  left: .8rem;
  top: .85rem;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-weight: 900;
}
.start-steps strong { display: block; color: var(--forest-deep); }
.start-steps span { color: var(--muted); font-size: .92rem; }

.beginner-note {
  margin-top: .9rem;
  padding: .8rem .9rem;
  border-left: 4px solid var(--moss);
  background: var(--sage-soft);
  color: #414b43;
  border-radius: 8px;
}
.beginner-note strong { color: var(--forest-deep); }

.recommended-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: .45rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: var(--note);
  color: #5f4a1c;
  border: 1px solid #c9b887;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.prompt-card.recommended { border-color: #9ba78f; }

.optional-details {
  margin-top: 1rem;
  padding-top: .15rem;
  border-top: 1px dashed #b8b09f;
}
.optional-details > summary {
  width: fit-content;
  min-height: 44px;
  color: var(--forest-deep);
  font-weight: 850;
  cursor: pointer;
}
.optional-details > summary::marker { color: var(--rust); }
.optional-details[open] > summary { margin-bottom: .75rem; }
.optional-details .field-grid { margin-top: 0; }
.optional-help {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.task-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.task-extra .field {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--paper);
}
.task-extra .field.full { grid-column: 1 / -1; }

.route-card {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid #a7b19f;
  border-left: 5px solid var(--moss);
  border-radius: 10px;
  background: var(--sage-soft);
}
.route-card h2,
.route-card h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.route-card p { margin: .3rem 0; }

.plain-checklist {
  margin: .65rem 0 0;
  padding-left: 1.2rem;
}
.plain-checklist li { margin: .3rem 0; }

.small-label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.decision-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
}
.decision-card h3 {
  margin: 0 0 .35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}
.decision-card p { margin: 0; color: var(--muted); }

/* Guide and support pages */
.guide-section {
  margin-top: 3.6rem;
  padding-top: 2.6rem;
  border-top: 1px dashed #b9b09f;
}
.guide-section:first-of-type { margin-top: 2rem; }
.guide-section > p { max-width: var(--prose); color: var(--muted); }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.guide-card {
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
}
.guide-card h3 {
  margin: 0 0 .35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}
.guide-card p { margin: .25rem 0; color: #4d564f; }
.guide-card ul { margin: .55rem 0 0; padding-left: 1.2rem; }
.guide-card li { margin: .3rem 0; }

.term-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.term-card {
  padding: .95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--paper);
}
.term-card strong { display: block; color: var(--forest-deep); margin-bottom: .2rem; }
.term-card span { color: var(--muted); font-size: .92rem; }

.do-dont-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.do-dont {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
}
.do-dont h3 { margin: 0 0 .45rem; font-family: Georgia, "Times New Roman", serif; }
.do-dont ul { margin: 0; padding-left: 1.2rem; }
.do-dont li { margin: .35rem 0; }

.support-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin: 1rem 0 2.4rem;
}
.support-task-grid a {
  min-height: 120px;
  display: block;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  color: var(--forest-deep);
  text-decoration: none;
}
.support-task-grid a:hover { border-color: var(--moss); box-shadow: var(--shadow); }
.support-task-grid strong { display: block; margin-bottom: .3rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }
.support-task-grid span { color: var(--muted); font-size: .92rem; }

.static-prompt {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f3efe6;
  color: #303630;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
  line-height: 1.55;
}
.copy-block {
  margin-top: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
}
.copy-block h3 { margin: .45rem 0 .35rem; font-family: Georgia, "Times New Roman", serif; }
.copy-block > p { margin: .25rem 0 .75rem; color: var(--muted); }
.copy-block .copy-status { margin-left: .6rem; }

.boundary-note {
  margin-top: 1rem;
  padding: .85rem .95rem;
  border-left: 5px solid var(--ochre);
  border-radius: 8px;
  background: var(--note);
  color: #403d31;
}
.boundary-note strong { color: #5e4b21; }

.troubleshoot-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: .95rem;
}
.troubleshoot-table th,
.troubleshoot-table td {
  padding: .75rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.troubleshoot-table th { background: var(--paper); color: var(--forest-deep); }

/* Adjunct friction pass: required details appear before route shortcuts on task pages. */
main .content:has(> .details-panel) {
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
}
main .content:has(> .details-panel) > .route-intro { order: -4; }
main .content:has(> .details-panel) > .beginner-note { order: -3; }
main .content:has(> .details-panel) > .details-panel {
  order: -2;
  margin-bottom: 1.35rem;
  scroll-margin-top: 1rem;
}
main .content:has(> .details-panel) > .task-nav {
  order: -1;
  margin-bottom: 1rem;
}
main .content:has(> .details-panel) > .route-intro {
  grid-template-columns: 56px minmax(0, 1fr);
  margin-bottom: 1rem;
  padding: .9rem 1rem;
}
main .content:has(> .details-panel) > .route-intro img {
  width: 48px;
  height: 48px;
}
main .content:has(> .details-panel) > .route-intro h2 { font-size: 1.2rem; }
main .content:has(> .details-panel) > .route-intro .start-steps { display: none; }
main .content:has(> .details-panel) > .route-intro .beginner-note {
  margin-top: .55rem;
  padding: .6rem .75rem;
}

@media (max-width: 900px) {
  .start-steps,
  .decision-grid { grid-template-columns: 1fr; }
  .task-extra { grid-template-columns: 1fr; }
  .task-extra .field.full { grid-column: auto; }
  .guide-grid,
  .do-dont-grid { grid-template-columns: 1fr; }
  .term-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-task-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .route-intro { grid-template-columns: 1fr; }
  .route-intro img { width: 58px; height: 58px; }
  main .content:has(> .details-panel) > .route-intro {
    grid-template-columns: 1fr;
    padding: .8rem .9rem;
  }
  main .content:has(> .details-panel) > .route-intro img { display: none; }
  .term-grid { grid-template-columns: 1fr; }
  .troubleshoot-table,
  .troubleshoot-table tbody,
  .troubleshoot-table tr,
  .troubleshoot-table th,
  .troubleshoot-table td { display: block; width: 100%; }
  .troubleshoot-table thead { position: absolute; left: -9999px; }
  .troubleshoot-table tr { margin-bottom: .75rem; border: 1px solid var(--border); }
  .troubleshoot-table td { border: 0; border-bottom: 1px solid var(--border); }
  .troubleshoot-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .2rem;
    color: var(--forest-deep);
    font-weight: 850;
  }
  .troubleshoot-table td:last-child { border-bottom: 0; }
}
