/* The launcher and the app switcher. Same tokens as the rest of the app. */

/* ---------- Launcher: the shell steps aside ---------- */
body[data-screen=start] .sidebar, body[data-screen=start] .topbar { display: none; }
/* One column, whatever else has opinions about .app: the sidebar is hidden here. */
body[data-screen=start] .app,
body[data-screen=start][data-nav] .app { grid-template-columns: minmax(0, 1fr); }
/* align-content (not place-items) so the single column still stretches: a centred grid item would
   shrink to its content and collapse the two cards into one column. */
body[data-screen=start] main { max-width: none; padding: 0; display: grid; align-content: center; min-height: 100vh; }
.start-screen { width: min(900px, 100%); margin: 0 auto; padding: 40px 20px 56px; text-align: center; animation: jo-rise .45s var(--ease-out, ease) both; }
.start-mark { width: 68px; height: 68px; object-fit: contain; margin-bottom: 18px; }
.start-screen h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 8px; }
.start-sub { color: var(--muted); margin: 0 0 32px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: var(--gap); text-align: left; }
.mode-card { display: flex; flex-direction: column; gap: 14px; padding: var(--pad); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s var(--ease-spring, ease), border-color .18s, box-shadow .18s; }
.mode-card:hover, .mode-card:focus-visible { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 16px 40px #0008; }
.mode-ico { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; font-size: 1.6rem; color: var(--accent); background: linear-gradient(140deg, #11314a, #091c2c); border: 1px solid #25506c; }
.mode-body { display: flex; flex-direction: column; gap: 6px; }
.mode-body b { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.mode-body small { color: var(--muted); }
.mode-last { font-style: normal; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: #12324a; color: var(--accent); border: 1px solid #365e7a; }
.mode-body ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.mode-body li { position: relative; padding-left: 18px; font-size: .85rem; color: var(--muted); }
.mode-body li::before { content: '›'; position: absolute; left: 4px; color: var(--accent); }
.mode-go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; color: var(--accent); font-weight: 600; font-size: .9rem; }
.mode-study .mode-ico { color: #b5a8ff; background: linear-gradient(140deg, #251a4a, #130d26); border-color: #4a3a7a; }
.mode-study:hover, .mode-study:focus-visible { border-color: #8d7ddb; }
.mode-study .mode-go { color: #b5a8ff; }

/* ---------- Workspace chip in the sidebar ---------- */
.mode-chip { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #071827; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.mode-chip:hover { border-color: var(--accent); color: var(--ink); }
.mode-chip b { font-weight: 600; }
.mode-chip .swap { margin-left: auto; opacity: .7; }
body[data-nav=collapsed] .mode-chip b, body[data-nav=collapsed] .mode-chip .swap { display: none; }
body[data-nav=collapsed] .mode-chip { justify-content: center; padding: 7px 0; }

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  /* The sidebar is a bottom bar on phones: the chip would eat the nav's width. It returns in the drawer. */
  .mode-chip { display: none; }
  body.nav-open .mode-chip { display: flex; }
  body[data-screen=start] main { align-content: start; padding-top: 24px; }
  .start-screen { padding: 28px 16px 40px; }
  .mode-grid { grid-template-columns: minmax(0, 1fr); }
}
