/* Overall checklist page */
.ck-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ck-tag .i { font-size: 12px; }
/* Section labels are plain facts, so they share the neutral grey (colour is kept for meaning: free, warning) */
.t-visa, .t-acc, .t-ess { background: var(--badge-gray-bg); color: var(--badge-gray-fg); }

/* Next up */
.next-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 24px; }
.ck-opts { display: none; }
.nx-list { list-style: none; display: grid; gap: 8px; }
.nx-list a { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 12px; background: var(--page); text-decoration: none; transition: background .15s var(--ease); }
@media (hover: hover) and (pointer: fine) { .nx-list a:hover { background: var(--tint-teal); } }
.nx-n { width: 30px; height: 30px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; font: 600 14px var(--font-display); }
.nx-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nx-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--heading); line-height: 1.35; }
.nx-stage { font-size: 13px; color: var(--muted); }
.nx-done { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--badge-green-bg); color: var(--badge-green-fg); font-weight: 600; }

/* Toolbar */
.ck-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ck-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-card); font-size: 14px; font-weight: 500; color: var(--body-strong); cursor: pointer; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw { width: 34px; height: 20px; border-radius: 999px; background: var(--chip); position: relative; transition: background .15s var(--ease); }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s var(--ease); }
.toggle input:checked + .sw { background: var(--brand); }
.toggle input:checked + .sw::after { transform: translateX(14px); }
.toggle input:focus-visible + .sw { outline: 3px solid rgba(0,151,178,.35); outline-offset: 2px; }
.ck-tools .btn { height: 40px; padding: 0 16px; font-size: 14px; }
.sync-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.sync-note .i { color: var(--brand); margin-top: 4px; flex: none; }

/* Stage sections */
.stage-prog { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.stage-bar { flex: 1; max-width: 260px; height: 6px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.stage-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s var(--ease); }
.stage-cnt { font-size: 13px; font-weight: 600; color: var(--brand-deep); }
.ck-list { list-style: none; display: grid; gap: 12px; }
.ck-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-card); border: 1.5px solid transparent; transition: border-color .2s var(--ease), opacity .2s var(--ease); scroll-margin: 120px; }
.ck-row.flash { border-color: var(--brand); }
.ck-row.s-doing { border-color: var(--border-teal); }
.ck-row.s-na { opacity: .7; }
.ck-main { flex: 1; min-width: 0; display: flex; gap: 16px; align-items: flex-start; cursor: pointer; position: relative; }
.ck-main input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ck-main .tbox { margin-top: 2px; }
.ck-main input:checked + .tbox { background: var(--brand); border-color: var(--brand); color: #fff; }
.ck-main input:focus-visible + .tbox { outline: 3px solid rgba(0,151,178,.35); outline-offset: 2px; }
.ck-main input:disabled + .tbox { background: var(--chip); border-color: var(--chip); }
.ck-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ck-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--heading); line-height: 1.4; }
.s-done .ck-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--icon-muted); }
.ck-sub { font-size: 14px; color: var(--body); line-height: 1.5; }
.s-done .ck-sub { color: var(--muted); }
.ck-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.ck-doing { height: 24px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; background: var(--brand); color: #fff; }
.ck-na-tag { height: 24px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; background: var(--badge-gray-bg); color: var(--badge-gray-fg); }
.ck-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.ck-nabtn { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font: 500 13px var(--font-body); color: var(--body); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ck-nabtn:hover { border-color: var(--brand); color: var(--brand-deep); } }
.ck-link { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--tint-teal); border: 1px solid var(--border-teal); color: var(--brand-deep); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ck-link .i { font-size: 12px; transition: transform .15s var(--ease); }
@media (hover: hover) and (pointer: fine) { .ck-link:hover .i { transform: translateX(2px); } }
.ck-empty { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 16px; background: var(--card); color: var(--muted); font-size: 15px; }
.ck-empty .i { color: var(--badge-green-fg); }

/* Side */
.cbars { display: grid; gap: 16px; margin-top: 16px; }
.cb-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cb-n { font-size: 13px; font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.cb-bar { height: 6px; border-radius: 999px; background: rgba(0,0,0,.06); overflow: hidden; }
.cb-bar span { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .3s var(--ease); }
.cb-bar.t-visa, .cb-bar.t-acc, .cb-bar.t-ess { background: rgba(0,0,0,.06); }

@media (max-width: 900px) { .next-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .ck-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .ck-acts { padding-left: 36px; flex-wrap: wrap; }
  .ck-bar { align-items: stretch; }
  /* toggles, Download and Print fold behind the Options button */
  .ck-opts { display: inline-flex; align-self: flex-start; }
  .ck-tools:not(.open) { display: none; }
}
@media print {
  .hero, .strip, .side, .ck-bar, .sync-note, #more, .disclaimer, .page-footer, .ck-acts, #next { display: none !important; }
  .layout { display: block !important; }
  .section::before { display: none !important; }
  .ck-row { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
.sect-head .stage-prog { display: flex; width: 100%; justify-content: flex-start; }
.sect-head .stage-bar { flex: 0 0 220px; max-width: 50%; display: block; }
@media (max-width: 640px) { .nx-list .ck-tag { display: none; } }
.ck-nabtn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ck-nabtn .i { font-size: 12px; color: var(--icon-muted); }
.ck-nabtn.on { background: var(--badge-gray-bg); border-color: transparent; color: var(--body-strong); }
.na-count { color: var(--muted); font-weight: 400; }
.s-na .ck-title { color: var(--muted); }
.ck-group { list-style: none; font-family: var(--font-display); font-weight: 500; font-size: 13px; color: var(--brand-deep); margin: 12px 0 2px; }
.ck-group:first-child { margin-top: 0; }

/* "Why this matters" under each task */
.ck-row { flex-wrap: wrap; }
.ck-why { flex: 1 1 100%; min-width: 0; max-width: 100%; margin: -6px 0 0 40px; box-sizing: border-box; }
.ck-why p { overflow-wrap: anywhere; }
.ck-why summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font: 600 13px var(--font-display); color: var(--brand-deep); padding: 2px 0; }
.ck-why summary::-webkit-details-marker { display: none; }
.ck-why summary .i { font-size: 12px; color: var(--brand); }
.ck-why[open] summary { margin-bottom: 4px; }
.ck-why p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--body); max-width: 70ch; }
@media (max-width: 640px) { .ck-why { margin-left: 0; width: 100%; flex-basis: auto; } }
/* Focus on your stage */
.ck-folded { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-radius: 16px; background: var(--card); border: 1px dashed var(--border); color: var(--muted); font-size: 14px; }
.ck-folded .i { color: var(--brand); }
.ck-folded .btn.link { margin-left: auto; }
.ck-yours { display: none; margin-left: 12px; vertical-align: middle; padding: 4px 12px; border-radius: 999px; background: var(--badge-teal-bg); color: var(--brand-deep); font: 600 12px var(--font-display); letter-spacing: normal; }
.ck-cur .ck-yours { display: inline-block; }

/* Opening without jumps (12 Nov 2026): checklist.js fills Next actions after the page first draws, so hold the
   space of three tasks until then (sizes measured 12 Nov 2026) */
#nextList:empty { min-height: 218px; }
@media (max-width: 640px) { #nextList:empty { min-height: 279px; } }

/* Key tasks first, then "Good to do", closed until the student opens it (18 Nov 2026). Printing shows every task. */
.ck-goodhead { list-style: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding: 12px 20px; border-radius: 16px; border: 1px dashed var(--border); color: var(--muted); font-size: 14px; }
.ck-goodt { font: 600 14px var(--font-display); color: var(--heading); }
.ck-goodhead .btn.link { margin-left: auto; }
@media screen { .good-closed > .ck-g { display: none; } }
@media (max-width: 640px) { .ck-goodhead { padding: 12px 16px; } }
@media print { .ck-goodhead .btn { display: none !important; } }

/* ==== Phones: less to read before the first task (18 Nov 2026) ==== */
.intro-short { display: none; }
@media (max-width: 640px) {
  /* one line instead of the paragraph; the sync note repeats the line under the page title */
  #next .intro-text, #next .sync-note { display: none; }
  #next .intro-short { display: block; grid-column: 1; margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--body); }
  /* Next actions left out when it would only repeat the first tasks of the stage below (checklist.js, .nx-dup).
     Until checklist.js has decided, the page assumes it will, the usual case. */
  #next:is(.nx-dup, :has(#nextList:empty)) :is(.intro-title, .intro-ill, .next-grid) { display: none; }
  #next:is(.nx-dup, :has(#nextList:empty)) .intro-short { grid-column: 1 / -1; margin-top: 0; }
  #next:is(.nx-dup, :has(#nextList:empty)) .ck-bar { margin-top: 16px !important; padding-top: 0 !important; border-top: 0 !important; }
  /* the filters stay on one row you can swipe, like the other pill rows */
  .ck-bar .filters { flex-wrap: nowrap; scroll-snap-type: x proximity; scroll-padding-inline: 6px; overscroll-behavior-x: contain; }
  .ck-bar .filter { flex: 1 0 auto; justify-content: center; height: 44px; padding: 0 10px; scroll-snap-align: start; }
  .ck-bar .filter .fcount { display: none; } /* so all four fit on a 375px phone; each stage shows its own count */
}
