/* LifeWork shell page: the shared layout for macro engagement spaces (Explore, Mentor, and any later
   shell). Identical in every shell repo: change it in one, copy it to the others (or, later, take it
   from Spoke-Template). Colours come only from brand.css tokens. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--navy); font-family: var(--font);
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--navy); font-weight: 800; text-wrap: balance; }
p { margin: 0; }
a { color: var(--blue); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Topbar: the approved one (navy, 56px, one row, reversed logo at 22px) ----------
   Right side: LifeCoins + account when signed in; Sign in when not. Nothing else lives up here. */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 56px; background: var(--navy);
  box-shadow: var(--topbar-shadow); display: flex; align-items: center; gap: 12px; padding: 0 20px;
}
.topbar .logo { height: 22px; width: auto; display: block; }
.topbar .divider { width: 1px; height: 22px; background: var(--on-navy-line); }
.topbar .app-name { color: var(--white); font-size: 12px; font-weight: 800; letter-spacing: .5px; opacity: .9; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.topbar .me {
  display: flex; align-items: center; gap: 8px; color: var(--on-navy-soft); font-size: 12px; font-weight: 600;
  background: none; border: 0; cursor: pointer; padding: 4px; border-radius: var(--radius-btn);
}
.topbar .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--white); color: var(--navy);
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
}
.coin-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--on-navy-line); color: var(--white); font-size: 12px; font-weight: 700;
}
.coin-btn:hover { border-color: var(--gold); }
.coin-btn .hex { color: var(--gold); font-size: 16px; line-height: 1; }
.coin-btn .unit { font-weight: 600; color: var(--on-navy-soft); }
.sign-in {
  height: 32px; padding: 0 16px; border-radius: var(--radius-btn); cursor: pointer; font-size: 12px; font-weight: 700;
  background: var(--white); color: var(--navy); border: 1px solid var(--white);
}
.sign-in:hover { background: transparent; color: var(--white); }

/* ---------- Page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 24px 20px 56px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gray); }
.section-head h2 { font-size: 18px; }
.section-head .hint { font-size: 12px; color: var(--gray); }

/* Honest-state strip (sample data, not connected yet) */
.notice {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--blue-tint);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; font-size: 12px; color: var(--navy);
}
.notice b { font-weight: 700; }
.preview-switch { display: inline-flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.preview-switch button {
  border: 1px solid var(--border); background: var(--white); color: var(--navy); border-radius: 999px;
  padding: 3px 10px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.preview-switch button[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  margin-top: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: var(--card-shadow);
}
.hero .greeting { font-size: 13px; font-weight: 600; color: var(--gray); }
.hero h1 { font-size: 30px; line-height: 1.2; margin-top: 4px; }
.hero .lead { margin-top: 10px; font-size: 15px; color: var(--gray); max-width: 60ch; }
.hero .side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; min-width: 240px; }
.hero .side-note { font-size: 13px; color: var(--gray); max-width: 30ch; text-align: right; }
.progress { width: 100%; }
.progress .label { font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.progress .label span { color: var(--gray); font-weight: 600; }
.segments { display: flex; gap: 4px; margin-top: 6px; }
.segments i { flex: 1; height: 8px; border-radius: 4px; background: var(--border); }
.segments i.on { background: var(--navy); }
.segments i.part { background: var(--blue); }
.last-step { width: 100%; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.last-step span { color: var(--gray); font-weight: 600; }
.last-step b { font-weight: 700; }

/* ---------- Buttons and chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--radius-btn);
  font-weight: 700; letter-spacing: .2px; font-size: 13px; padding: 9px 16px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--navy); background: var(--navy); color: var(--white); white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); }
.btn.outline { background: var(--white); color: var(--navy); }
.btn.outline:hover { background: var(--navy-tint); filter: none; }
.btn.small { padding: 6px 12px; font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.chip.not-started { background: var(--gray-tint); color: var(--gray); }
.chip.in-progress { background: var(--blue-tint); color: var(--navy); }
.chip.up-to-date { background: var(--green-tint); color: var(--green); }
.chip.refresh-due { background: var(--amber-tint); color: var(--amber); }
.chip.coming-soon { background: var(--gray-tint); color: var(--gray); }
.chip.free { background: var(--green-tint); color: var(--green); }
.chip.coins { background: var(--gold-tint); color: var(--navy); }
.chip.coins::before { content: "\2B21"; color: var(--gold); }
.chip.fun { background: var(--navy-tint); color: var(--navy); }

/* ---------- Start here (shown before anything is started) ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.step {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--card-shadow);
}
.step .num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--white);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.step h3 { font-size: 15px; }
.step p { color: var(--gray); font-size: 13px; flex: 1; }
.step .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.step .actions { margin-top: 4px; }

/* ---------- Tools: one row each = what you can do + what you've done + when you last did it ---------- */
.engines { display: flex; flex-direction: column; gap: 12px; }
.engine {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 210px; gap: 24px; align-items: center;
  box-shadow: var(--card-shadow); transition: box-shadow .15s;
}
.engine:hover { box-shadow: var(--card-shadow-hover); }
.engine .e-id { display: flex; flex-direction: column; gap: 10px; }
.engine .top { display: flex; align-items: center; gap: 12px; }
.engine .icon {
  width: 40px; height: 40px; border-radius: var(--radius); background: var(--navy-tint); color: var(--navy);
  display: grid; place-items: center; flex: none;
}
.engine.done .icon { background: var(--navy); color: var(--white); }
.engine .icon svg { width: 22px; height: 22px; }
.engine h3 { font-size: 16px; line-height: 1.25; }
.engine .status { display: flex; gap: 6px; flex-wrap: wrap; }
.engine .e-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.engine .what { color: var(--gray); font-size: 13px; }
.engine .gives { font-size: 12px; font-weight: 600; }
.engine .gives b { font-weight: 700; color: var(--gray); text-transform: uppercase; font-size: 10px; letter-spacing: 1px; display: block; }
.summary .v { font-size: 18px; font-weight: 800; line-height: 1.25; }
.summary .s { font-size: 12px; color: var(--gray); margin-top: 4px; }
.summary .list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.summary .list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.summary .list li span { color: var(--gray); font-weight: 500; font-size: 12px; white-space: nowrap; }
.summary .bars { display: flex; flex-direction: column; gap: 4px; }
.summary .bar { display: grid; grid-template-columns: 110px 1fr 28px; gap: 10px; align-items: center; font-size: 12px; font-weight: 600; }
.summary .bar .track { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.summary .bar .fill { height: 100%; background: var(--navy); border-radius: 3px; }
.summary .bar .n { text-align: right; color: var(--gray); }
.engine .e-when { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border-left: 1px solid var(--border); padding-left: 20px; }
.when { display: flex; flex-direction: column; gap: 1px; }
.when-label { font-size: 11px; font-weight: 700; color: var(--gray); }
.when-days { font-size: 20px; font-weight: 800; line-height: 1.2; }
.when-nudge { font-size: 11px; color: var(--gray); margin-top: 2px; }
.when.fresh .when-nudge { color: var(--green); font-weight: 600; }
.when.stale .when-days { color: var(--amber); }
.when.stale .when-nudge { color: var(--amber); font-weight: 600; }
.when.none .when-days { color: var(--light-gray); }
.soon-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.engine.soon {
  display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 14px 20px;
  background: var(--bg); border-style: dashed; box-shadow: none;
}
.engine.soon:hover { box-shadow: none; }
.engine.soon .icon { background: var(--gray-tint); color: var(--gray); }
.engine.soon .soon-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.engine.soon h3 { font-size: 14px; }

/* ---------- Band: the shell's own quick question (if any) + paths ---------- */
.band { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
.band.solo { grid-template-columns: 1fr; }
.band.solo .paths { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--card-shadow); }
.card-title { font-size: 17px; margin-top: 6px; }
.card-hint { color: var(--gray); font-size: 13px; margin-top: 4px; }
.quick .q { font-size: 17px; font-weight: 800; line-height: 1.3; margin: 6px 0 12px; }
.quick .options { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .options button {
  border: 1px solid var(--border); background: var(--white); color: var(--navy); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.quick .options button:hover { border-color: var(--navy); }
.quick .options button[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.quick .after { margin-top: 12px; font-size: 12px; color: var(--gray); }
.quick .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.path {
  text-align: left; border: 1px solid var(--border); background: var(--white); border-radius: var(--radius);
  padding: 10px 12px; cursor: pointer; color: var(--navy); display: flex; flex-direction: column; gap: 2px;
}
.path:hover { border-color: var(--navy); background: var(--navy-tint); }
.path b { font-size: 13px; }
.path span { font-size: 11px; color: var(--gray); }

/* ---------- Footer and toast ---------- */
.foot-note { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 11px; color: var(--gray); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--navy); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600; box-shadow: var(--card-shadow-hover);
  max-width: calc(100% - 32px); z-index: 30;
}

/* ---------- Medium screens: the "when" column moves under the row ---------- */
@media (max-width: 900px) {
  .engine { grid-template-columns: 200px minmax(0, 1fr); }
  .engine .e-when { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; border-left: 0; border-top: 1px solid var(--border); padding: 12px 0 0; }
}
/* ---------- Small screens: 16px gutter, single column ---------- */
@media (max-width: 760px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar .me .name, .coin-btn .unit { display: none; }
  .page { padding: 16px 16px 48px; }
  .hero { grid-template-columns: 1fr; padding: 20px; }
  .hero h1 { font-size: 24px; }
  .hero .side { align-items: stretch; min-width: 0; }
  .hero .side-note { text-align: left; }
  .engine { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .engine .e-when { flex-wrap: wrap; gap: 10px; }
  .summary .bar { grid-template-columns: 96px 1fr 26px; }
  .band { grid-template-columns: 1fr; }
  .preview-switch { margin-left: 0; }
  .engine.soon { flex-wrap: wrap; }
}
@media (max-width: 380px) { .topbar .divider, .topbar .app-name { display: none; } }
