/* =====================================================================
   HOME (dashboard.html) — one system, a different page for each student
   state (2026-10-17). A compact welcome (the shared page header) with the
   state's next step, up to four career tiles, then My Space's Home panels
   (css/ms6/, since 2026-10-22). Same white cards and canvas as cards.css
   and the live Blue Rail tokens only: blue for what is done or chosen, sky
   for what is still to come, the canvas for empty.
   ===================================================================== */

.main-dashboard{padding-bottom:104px}
.db{display:flex; flex-direction:column; gap:20px}
.db .pg-head{margin-bottom:0}

.db-ph{width:44px; height:44px; flex:none; border-radius:13px; object-fit:cover}

.db-in{font-size:.8rem; font-weight:600; padding:4px 10px; border-radius:999px; background:var(--canvas); color:var(--ink-2); white-space:nowrap}
.db-in.soon{background:var(--blue-24); color:var(--blue)}

.db-checked{margin-top:auto; padding-top:12px; font-size:.78rem; color:var(--ink-3)}

/* ---- the numbers ------------------------------------------------------- */
/* the tiles sit on My Space's 12-column grid with its 20px gap, so their edges are the panels' lines below
   (2026-10-24): four tiles a quarter each; three are a half and two quarters, so they still meet the 6/3/3 rows */
.db-tiles{display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:20px}
.db-tiles > *{grid-column:span 3}
.db-tiles[style*="--n:3"] > :first-child, .db-tiles[style*="--n:2"] > *{grid-column:span 6}
.db-tiles[style*="--n:1"] > *{grid-column:1 / -1}
.db-t{position:relative; display:flex; flex-direction:column; min-width:0; padding:20px 24px 18px; border-radius:var(--rc-s, 22px); background:#fff; box-shadow:var(--card-shade);
  transition:box-shadow .3s cubic-bezier(.22,1,.36,1)}
.db-t:hover{box-shadow:0 1px 2px rgba(16,34,64,.04), 0 12px 28px -16px rgba(16,34,64,.18)}
/* the label is the tile's link; it covers the whole tile, and the chart's
   marks sit above it so each still shows its readout */
.db-th{display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:0; border:0; background:none;
  font:inherit; text-align:left; color:var(--ink-2); text-decoration:none; cursor:pointer}
.db-th::after{content:""; position:absolute; inset:0; border-radius:inherit}
.db-th:hover, .db-t:hover .db-th{color:var(--blue); text-decoration:none}
.db-th:focus-visible{outline:none}
.db-th:focus-visible::after{outline:2px solid var(--blue); outline-offset:2px}
.db-tl{font-size:.875rem; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.db-th .i{width:15px; height:15px; flex:none; color:var(--ink-4)}
.db-t:hover .db-th .i{color:var(--blue)}
.db-tv{margin-top:10px; display:flex; align-items:baseline; gap:2px; line-height:1}
.db-tv b{font-size:2.125rem; font-weight:600; letter-spacing:-.04em; color:var(--navy); font-variant-numeric:tabular-nums}
.db-tv span{font-size:1rem; font-weight:500; color:var(--ink-3); white-space:nowrap}
.db-tf{margin-top:6px; font-size:.8125rem; font-weight:500; color:var(--ink-3); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden}   /* two lines before it is cut */
.db-tf.up{color:var(--blue)}
.db-tf.down{color:#8A5300}
.db-tc{position:relative; z-index:1; display:flex; margin-top:auto; padding-top:14px; height:62px}
.db-tc [data-tip]{cursor:default; outline:none}
.db-tc [data-tip]:focus-visible{outline:2px solid var(--blue); outline-offset:2px; border-radius:4px}

/* Discovery: one segment per chapter, filled as far as it is answered */
.db-tc-seg{align-items:flex-end; gap:6px; height:44px}
.db-sg{flex:1; height:10px; border-radius:5px; background:var(--canvas); overflow:hidden}
.db-sg i{display:block; height:100%; width:var(--p); border-radius:inherit; background:var(--sky)}
.db-sg.done i{background:var(--blue)}
.db-sg:hover{box-shadow:0 0 0 3px var(--blue-24)}

/* Strong fits: every career, split by fit */
.db-tc-stack{align-items:flex-end; gap:3px; height:44px}
.db-st{height:10px; width:var(--w); min-width:6px; border-radius:5px; background:var(--canvas)}
.db-st.strong{background:var(--blue)}
.db-st.possible{background:var(--sky)}
.db-st:hover{box-shadow:0 0 0 3px var(--blue-24)}

/* Saved careers: their worlds' pictures */
.db-tc-ph{align-items:flex-end; height:54px}
.db-tc-ph img{width:34px; height:34px; border-radius:50%; object-fit:cover; box-shadow:0 0 0 3px #fff}
.db-tc-ph img + img{margin-left:-8px}
.db-tc-ph img:hover, .db-tc-ph img:focus-visible{position:relative; z-index:1; transform:translateY(-2px)}
.db-more{display:grid; place-items:center; width:34px; height:34px; margin-left:-8px; border-radius:50%; background:var(--canvas); box-shadow:0 0 0 3px #fff; font-size:.74rem; font-weight:650; color:var(--ink-2)}

/* Try-outs: one bar per try-out, filled by its steps */
.db-tc-bars{flex-direction:column; justify-content:flex-end; gap:6px; height:auto; min-height:44px}
.db-gb{display:block; height:8px; border-radius:4px; background:var(--canvas); overflow:hidden}
.db-gb i{display:block; height:100%; width:var(--p); border-radius:inherit; background:var(--blue)}
.db-gb:hover{box-shadow:0 0 0 3px var(--blue-24)}

/* Steps: one dot per step */
.db-tc-dots{flex-wrap:wrap; align-content:flex-end; gap:6px; height:auto; min-height:44px}
.db-dt{width:14px; height:14px; border-radius:50%; box-shadow:inset 0 0 0 1.5px var(--hair-3)}
.db-dt.done{background:var(--blue); box-shadow:none}
.db-dt:hover{transform:scale(1.25)}

/* Colleges and exams: a slot each */
.db-tc-slots{align-items:flex-end; gap:8px; height:52px}
.db-slot{display:grid; place-items:center; width:30px; height:30px; border-radius:10px; background:var(--canvas); box-shadow:inset 0 0 0 1.5px var(--hair-2)}
.db-slot.on{background:var(--blue); box-shadow:none; color:#fff}
.db-slot .i{width:15px; height:15px; stroke-width:2.6}

/* The next 30 days */
.db-tc-time{display:block}
.db-tl-line{position:absolute; left:0; right:0; top:34px; height:2px; border-radius:2px; background:var(--hair-2)}
.db-tt{position:absolute; top:29px; width:12px; height:12px; margin-left:-6px; border-radius:50%; background:var(--sky); box-shadow:0 0 0 2px #fff}
.db-tt.now{top:27px; width:16px; height:16px; margin-left:-8px; background:var(--blue)}
.db-tt:hover{box-shadow:0 0 0 2px #fff, 0 0 0 5px var(--blue-24)}
.db-tl-a, .db-tl-b{position:absolute; bottom:0; font-size:.6875rem; font-weight:600; color:var(--ink-3)}
.db-tl-a{left:0} .db-tl-b{right:0}

.db-tip{position:fixed; z-index:90; max-width:260px; padding:7px 11px; border-radius:10px; background:var(--navy); color:#fff; font-size:.8rem; font-weight:500; line-height:1.35; pointer-events:none; box-shadow:0 10px 24px -12px rgba(16,34,64,.6)}
.db-tip[hidden]{display:none}

/* Exams, in the exams dialog */
.db-exl-b{display:flex; flex-direction:column; min-width:0}
.db-exl-b b{font-weight:600}
.db-exl-b small{font-size:.82rem; color:var(--ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

/* Decide: the streams table */
.db-sx{width:100%; border-collapse:separate; border-spacing:0; font-size:.92rem}
.db-sx th, .db-sx td{padding:12px 10px; text-align:center; border-bottom:1px solid var(--hair)}
.db-sx thead th{font-size:.84rem; font-weight:600; color:var(--ink-3)}
.db-sx th[scope="row"], .db-sx thead th:first-child{text-align:left; padding-left:0; font-weight:500; color:var(--navy)}
.db-sx-c{display:flex; align-items:center; gap:12px; font-weight:600}
.db-sx-c .db-ph{width:36px; height:36px; border-radius:11px}
.db-y{display:inline-grid; place-items:center; width:24px; height:24px; border-radius:50%; background:var(--blue); color:#fff}
.db-y .i{width:13px; height:13px; stroke-width:2.8}
.db-n{color:var(--ink-4)}
.db-sx tfoot th, .db-sx tfoot td{border-bottom:0; padding-top:14px; color:var(--navy)}
.db-sx tfoot th[scope="row"]{font-weight:600}
.db-sx tfoot b{font-weight:650; font-variant-numeric:tabular-nums}
.db-sx.is-mini{font-size:.86rem}
.db-sx.is-mini th, .db-sx.is-mini td{padding:9px 6px}
.db-sx.is-mini .db-y{width:22px; height:22px}

/* ---- the dialogs: the choice, every stream, every exam ---------------- */
.db-dx, .db-dc{padding:4px 2px}
.db-dx-t{font-size:1.5rem; font-weight:600; letter-spacing:-.03em; color:var(--navy); margin:0 48px 20px 0}

.db-dc-l{list-style:none; margin:0; padding:0; display:grid; gap:8px}
.db-dc label{position:relative; display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:14px; padding:14px 16px; border-radius:18px; background:var(--canvas); cursor:pointer}
.db-dc input{position:absolute; opacity:0; width:1px; height:1px}
.db-dc .tick, .db-dc-r{width:22px; height:22px; border-radius:7px; display:grid; place-items:center; background:#fff; box-shadow:inset 0 0 0 1.5px var(--hair-3)}
.db-dc-r{border-radius:50%}
.db-dc .tick .i{width:13px; height:13px; stroke-width:2.8; color:#fff; opacity:0}
.db-dc input:checked + .tick{background:var(--blue); box-shadow:none}
.db-dc input:checked + .tick .i{opacity:1}
.db-dc input:checked + .db-dc-r{box-shadow:inset 0 0 0 7px var(--blue)}
.db-dc input:checked ~ .db-exl-b b{color:var(--blue)}
.db-dc label:has(input:checked){background:var(--blue-24)}
.db-dc input:focus-visible + span{outline:2px solid var(--blue); outline-offset:2px}
.db-dc-f{display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; margin-top:18px}

/* ---- narrower windows ---------------------------------------------------- */
@media (max-width:1180px){
  .db-tiles[style*="--n:4"] > *{grid-column:span 6}
}

@media (max-width:860px){
  .db-tiles[style*="--n:3"] > *{grid-column:span 6}
  .db-tiles[style*="--n:3"] > :last-child{grid-column:1 / -1}
}
@media screen and (max-width:640px){
  /* a phone: the tiles two by two and short, so Today starts on the first screen */
  .db-tiles{gap:12px}
  .db-tiles > *{grid-column:span 6 !important}
  .db-t{padding:14px 16px 12px}
  .db-tv b{font-size:1.6rem}
  .db-sx.is-mini th, .db-sx.is-mini td{padding:8px 3px}
}
@media (prefers-reduced-motion:reduce){ .db-t, .db-dt{transition:none} .db-dt:hover{transform:none} }
