/* atlas.css — the Map-your-work surface.
 *
 * Uses the site's existing tokens (--crimson, --graphite, --line, --radius…) rather than
 * introducing a second palette. Nothing here is a framework; the rest of the site is pure
 * static and this page keeps that property.
 *
 * One deliberate visual rule: a step a PERSON owns is marked with the crimson rule, and an
 * agent step is not. The eye should find the human moments first, because they are the point.
 */

.hero-slim { padding: 48px 0 24px; }

.atlas-app { margin: 8px 0 48px; min-height: 240px; }

.atlas-busy {
  color: var(--muted);
  font-size: .95rem;
  padding: 10px 0;
}
.atlas-busy::after { content: ""; }

.atlas-error {
  background: #fdf1f1;
  border: 1px solid #f3c9c9;
  border-radius: var(--radius);
  color: var(--crimson-deep);
  padding: 12px 14px;
  margin: 12px 0;
}

.atlas-revised {
  background: #f0f8f2;
  border: 1px solid #cfe8d6;
  border-radius: var(--radius);
  color: var(--good);
  padding: 10px 14px;
  margin: 12px 0;
}

/* ---- the conversation ---- */
.atlas-chat { max-width: 720px; }
.atlas-q { font-size: 1.15rem; color: var(--ink); margin: 18px 0 6px; }
.atlas-note { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }

.atlas-input {
  width: 100%;
  font: inherit;
  color: var(--text);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
  margin-bottom: 10px;
}
.atlas-input:focus { outline: 2px solid var(--crimson); outline-offset: 1px; }

.atlas-options { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.atlas-options .btn { text-align: left; }

/* ---- the result ---- */
.atlas-result h2 { margin-top: 28px; }
.atlas-sub { color: var(--muted); margin: 4px 0 20px; }

.atlas-overflow {
  background: var(--silver);
  border-left: 3px solid var(--slate);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  margin: 0 0 20px;
  color: var(--ink-2);
}

/* The site stylesheet gives EVERY <section> 72px of padding top and bottom (site.css). A stage is a
 * <section>, so a folded task list had ~150px of empty space between each stage header - live
 * for every visitor until 2026-09-23, found by looking at the page rather than testing it. */
.atlas-phase { margin: 0 0 28px; padding: 0; }
.atlas-phase h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--slate);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.atlas-task { margin: 6px 0; }

.atlas-step {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 16px;
  padding: 12px 0 12px 14px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--line);
}
/* The human moments carry the accent. An agent step is quiet by design. */
.atlas-step.is-human { border-left-color: var(--crimson); background: #fffafa; }
.atlas-step.confirmed { background: #fbfdfb; }

.atlas-who {
  color: var(--slate);
  font-size: .9rem;
  line-height: 1.45;
  padding-top: 2px;
}
.atlas-step.is-human .atlas-who { color: var(--crimson-deep); font-weight: 600; }

.atlas-text { color: var(--ink); margin-bottom: 4px; }
.atlas-why { color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* What the act leaves behind. Its own line, because it used to arrive glued to the step text
 * with a raw "->" — our prompt notation, on a page that promises no jargon. */
.atlas-result-of {
  color: var(--slate);
  font-size: .86rem;
  margin-bottom: 4px;
}

/* Which task these steps came from. Without it, five tasks' steps ran together under one phase
 * heading and nothing connected them back to the list the visitor had just clicked. */
.atlas-taskgroup { margin: 4px 0 18px; }
.atlas-taskname {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 2px;
}
.atlas-taskgroup:first-of-type .atlas-taskname { margin-top: 4px; }

.atlas-flag {
  margin-top: 6px;
  font-size: .88rem;
  color: var(--ink-2);
  background: var(--silver);
  border-radius: var(--radius);
  padding: 6px 10px;
  display: inline-block;
}

/* ---- the confirm control (L2) ---- */
.atlas-confirm {
  grid-column: 2;
  margin-top: 10px;
  padding: 10px 12px;
  background: #fbfbfc;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.atlas-reading { flex: 1 1 320px; color: var(--ink-2); font-size: .9rem; }

.atlas-picker {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
  background: #fbfbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.atlas-picker .atlas-reading { flex: 1 1 100%; margin-bottom: 2px; }

.btn-tiny {
  font-size: .82rem;
  padding: 5px 10px;
  border-radius: 6px;
}

.atlas-actions { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- the gate + the close ---- */
.atlas-gate {
  margin: 32px 0;
  padding: 24px;
  background: var(--silver);
  border-radius: var(--radius);
  max-width: 640px;
}
.atlas-gate h3 { margin-top: 0; }
.atlas-share {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 12px 0 14px; font-size: .92rem; color: var(--ink-2); line-height: 1.45; cursor: pointer;
}
.atlas-share input { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; }

.atlas-close {
  margin: 40px 0 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.atlas-close h3 { margin-top: 0; }

.atlas-explainer, .atlas-honest { margin: 48px 0; }
.atlas-honest p { max-width: 68ch; }

@media (max-width: 720px) {
  .atlas-step { grid-template-columns: 1fr; gap: 6px; }
  .atlas-confirm, .atlas-picker { grid-column: 1; }
  .atlas-who { font-weight: 600; }
}

/* ---- the skeleton stays on the page ----
 * It used to share a container with the atlas, so drawing the atlas destroyed the task list and
 * a visitor could open exactly one task with no way back. Separate containers, both visible. */
.atlas-skeleton { margin: 8px 0 8px; }
.atlas-skeleton .atlas-phase { margin: 0 0 18px; }
.atlas-skeleton .atlas-task { margin: 4px 0; }

/* ---- the task list: stages that fold, tasks that turn green once opened ---- */
.atlas-skel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 28px;
  align-items: start;
}
.atlas-skel-list { min-width: 0; }

.atlas-skeleton .atlas-phase { margin: 0 0 8px; }
.atlas-phase-toggle {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  text-align: left;
  font: inherit;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
  cursor: pointer;
  color: var(--ink);
}
.atlas-phase-toggle:hover { background: #fafafa; }
.atlas-phase-toggle:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }
.atlas-chevron { color: var(--slate); width: 1em; flex: 0 0 auto; }
.atlas-phase-name {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .95rem;
  color: var(--slate);
}
.atlas-phase.is-expanded .atlas-phase-name { color: var(--ink); }
.atlas-phase-meta { margin-left: auto; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.atlas-phase-body { padding: 8px 0 10px 22px; }

.atlas-task { position: relative; }
.atlas-task-btn { text-align: left; }

/* Opened: a medium green, so what has been looked at stands out while the visitor moves on to
 * other tasks. Dark text on it for contrast; it is a state, not a disabled control. */
.atlas-skeleton .atlas-task-btn.is-open {
  background: #8fcca2;
  border-color: #6fb886;
  color: #0f3d1e;
  cursor: default;
}
.atlas-skeleton .atlas-task-btn.is-pending {
  background: #e3f3e8;
  border-color: #b9dfc5;
  color: #0f3d1e;
  cursor: progress;
}
.atlas-skeleton .atlas-task-btn.is-pending::after { content: " …"; }
.atlas-app.is-busy .atlas-task-btn:not(.is-open):not(.is-pending) { cursor: progress; }

/* The plain-English description, beside the task being pointed at. */
.atlas-desc-col { position: relative; min-height: 1px; }
.atlas-desc {
  position: absolute;
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid #6fb886;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: .93rem;
  line-height: 1.5;
  color: var(--text);
  pointer-events: none;           /* never steals the hover from the task it describes */
}
.atlas-desc p { margin: 4px 0 0; }
.atlas-desc-name { font-weight: 600; color: var(--ink); font-size: .9rem; }

@media (max-width: 900px) {
  .atlas-skel-grid { grid-template-columns: 1fr; gap: 0; }
  .atlas-desc-col { display: none; }
  .atlas-task .atlas-desc { position: static; margin: 6px 0 4px; box-shadow: none; }
  .atlas-phase-body { padding-left: 8px; }
}

/* ---- attachments ---- */
.atlas-files { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.atlas-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.atlas-file-input:focus-visible + label { outline: 2px solid var(--crimson); outline-offset: 2px; }
.atlas-files label { cursor: pointer; }
.atlas-file-hint { margin: 0; flex: 1 1 280px; }
.atlas-file-list { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-file-list:empty { display: none; }
.atlas-file-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--silver); border-radius: 999px; padding: 4px 6px 4px 12px;
  font-size: .86rem; color: var(--ink-2); max-width: 100%;
  overflow-wrap: anywhere;
}
.atlas-file-x {
  border: none; background: #e2e2e2; border-radius: 50%; width: 20px; height: 20px;
  cursor: pointer; line-height: 1; font-size: 14px; color: var(--ink);
}
.atlas-files-read {
  max-width: 720px;
  margin: 8px 0 20px;
  padding: 14px 16px;
  background: var(--silver);
  border-left: 3px solid var(--slate);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.atlas-files-read h3 { margin: 0 0 6px; font-size: 1rem; }
.atlas-files-read p { margin: 4px 0 0; }

/* ---- when maps are paused (spec section 15) ---- */
.atlas-paused {
  max-width: 720px;
  margin: 12px 0 20px;
  padding: 14px 16px;
  background: var(--silver);
  border-left: 3px solid var(--slate);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.atlas-paused p { margin: 0; }
.atlas-paused-offer { padding: 20px 22px; }
.atlas-paused-offer h3 { margin: 0 0 6px; }
.atlas-paused-offer > p { margin: 0 0 8px; color: var(--ink-2); }
.atlas-paused-offer .atlas-talk-form { max-width: 560px; }
.atlas-paused-offer .atlas-paused-more { margin: 14px 0 0; }
.atlas-paused-more a { color: var(--crimson-deep); }

#atlas-steps { border-top: 1px solid var(--line); padding-top: 8px; }
#atlas-steps:empty { border-top: none; }

/* The row a visitor just corrected, so the re-render does not hide what their change did.
 * Without it, a correction on a 200-step atlas redraws every row and nothing marks the one
 * that moved. */
.atlas-step.just-revised {
  outline: 2px solid var(--good);
  outline-offset: 2px;
  transition: outline-color .4s ease;
}

/* ==== spec section 14: tailored path, payoff screen, orientation ======================== */

/* ---- the links under the heading + the introduction cards ---- */
.atlas-tools { margin: 10px 0 0; font-size: .95rem; }
.atlas-tools a { color: var(--crimson-deep); }
.atlas-intro {
  max-width: 720px;
  margin: 8px 0 24px;
  padding: 22px 24px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.atlas-intro h2 { margin: 0 0 8px; font-size: 1.3rem; }
.atlas-intro p { margin: 0 0 10px; color: var(--ink-2); }
.atlas-intro-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.atlas-intro-bar .atlas-note { margin: 0 auto 0 0; }

/* ---- help beside a question ---- */
.atlas-help { color: var(--muted); font-size: .9rem; margin: 0 0 10px; max-width: 68ch; }
.atlas-examples { margin: 0 0 12px; font-size: .92rem; color: var(--ink-2); max-width: 68ch; }
.atlas-examples summary { cursor: pointer; color: var(--crimson-deep); }
.atlas-examples p { margin: 6px 0 0; }

/* ---- the tailored offer and form ---- */
.atlas-tailor-offer {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: var(--silver);
  border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  max-width: 720px;
}
.atlas-tailor-offer p { margin: 0; flex: 1 1 320px; font-size: .93rem; color: var(--ink-2); }
.atlas-tailor { max-width: 720px; }
.atlas-field { margin: 0 0 16px; }
.atlas-field > label, .atlas-label { display: block; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.atlas-select {
  font: inherit; color: var(--text); padding: 9px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; max-width: 100%;
}
.atlas-select-small { font-size: .88rem; padding: 6px 10px; }
.atlas-input-line { margin-bottom: 6px; }
.atlas-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; margin: 0 0 8px; }
.atlas-check { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; line-height: 1.4; }
.atlas-check input { margin-top: 3px; flex: 0 0 auto; }

/* ---- the outline review ---- */
.atlas-outline-stage {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px;
  max-width: 820px;
}
.atlas-outline-row { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.atlas-outline-row .atlas-input { margin: 0; padding: 7px 10px; }
.atlas-outline-head .atlas-input { font-weight: 600; }
.atlas-outline-no { color: var(--slate); font-weight: 600; min-width: 1.6em; }
.atlas-outline-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0 10px 1.6em; }
.atlas-outline-tasks { margin-left: 1.6em; }
.atlas-icon-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 30px; height: 30px;
  cursor: pointer; color: var(--ink-2); flex: 0 0 auto; font-size: .9rem; line-height: 1;
}
.atlas-icon-btn:hover { border-color: var(--slate); }

/* ---- "What we found" ---- */
.atlas-found {
  margin: 16px 0 28px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.atlas-found h3 { margin: 0 0 6px; }
.atlas-found-headline { font-size: 1.15rem; color: var(--ink); margin: 0 0 6px; font-weight: 600; }
.atlas-found-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; margin: 12px 0 4px; }
.atlas-found-grid h4 { margin: 6px 0 4px; font-size: .95rem; }
.atlas-found-grid ul, .atlas-found-list ul { margin: 0; padding-left: 1.1em; font-size: .92rem; color: var(--ink-2); }
.atlas-found-grid li, .atlas-found-list li { margin: 3px 0; }
.atlas-found-list { margin: 8px 0 0; font-size: .92rem; }
.atlas-found-list summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.atlas-next { margin: 16px 0 0; padding: 14px 16px; background: var(--silver); border-radius: var(--radius); }
.atlas-next h4 { margin: 0 0 4px; }
.atlas-next p { margin: 0 0 10px; color: var(--ink-2); font-size: .93rem; }
.atlas-talk { margin-top: 12px; max-width: 560px; }
.atlas-talk-form label { display: block; margin: 8px 0 4px; font-weight: 600; font-size: .92rem; }
.atlas-talk-form input[type=email] {
  font: inherit; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
}
.atlas-talk-form .atlas-share { font-weight: 400; }

/* ---- "Worth a check" ---- */
.atlas-checks {
  margin: 0 0 28px; padding: 16px 18px; border-radius: var(--radius);
  border: 1px dashed #d8b4b4; background: #fffafa;
}
.atlas-checks h3 { margin: 0 0 4px; }
.atlas-check-item { padding: 10px 0; border-top: 1px solid var(--line); }
.atlas-check-item:first-of-type { border-top: none; }
.atlas-check-item .atlas-confirm { margin-top: 8px; }
.atlas-notright {
  border: none; background: none; padding: 0; margin-top: 4px; cursor: pointer;
  color: var(--slate); font-size: .82rem; text-decoration: underline; font: inherit; font-size: .82rem;
}
.atlas-notright:hover { color: var(--crimson-deep); }
.atlas-step .atlas-picker { grid-column: 2; }

/* ---- steps an agent could add ---- */
.atlas-suggest {
  margin: 28px 0; padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid #cfe8d6; background: #f7fcf8;
}
.atlas-suggest h3 { margin: 0 0 4px; }
.atlas-suggestion {
  display: grid; grid-template-columns: 230px 1fr; gap: 16px;
  padding: 10px 0; border-top: 1px solid #e3f1e7;
}

/* ---- the example map ---- */
.atlas-example {
  margin: 8px 0 32px; padding: 20px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
}
.atlas-example-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.atlas-example-head h2 { margin: 0; }
.atlas-example-desc { font-size: .92rem; color: var(--ink-2); margin: 0 0 12px; max-width: 76ch; }
.atlas-ex-stage { border-bottom: 1px solid var(--line); padding: 6px 0; }
.atlas-ex-stage > summary { cursor: pointer; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--slate); font-size: .95rem; }
.atlas-ex-task { margin: 6px 0 6px 18px; }
.atlas-ex-task > summary { cursor: pointer; color: var(--ink); }
.atlas-ex-step { display: grid; grid-template-columns: 200px 1fr; gap: 12px; font-size: .9rem; padding: 4px 0 4px 18px; border-left: 3px solid transparent; }
.atlas-ex-step.is-human { border-left-color: var(--crimson); }
.atlas-ex-who { color: var(--slate); }
.atlas-ex-step.is-human .atlas-ex-who { color: var(--crimson-deep); font-weight: 600; }
.atlas-ex-suggest { margin-top: 14px; font-size: .92rem; }

@media (max-width: 720px) {
  .atlas-found-grid { grid-template-columns: 1fr; }
  .atlas-suggestion, .atlas-ex-step { grid-template-columns: 1fr; gap: 4px; }
  .atlas-outline-opts, .atlas-outline-tasks { margin-left: 0; }
  .atlas-step .atlas-picker { grid-column: 1; }
}
