/* Student portal, join page and certificate verification — on top of public.css */
.wrap.sp-main { max-width: 1180px; }
header .wrap.sp-top { max-width: 1180px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
nav a.is-active { text-decoration: underline; text-underline-offset: 4px; }
.sp-layout { display: grid; grid-template-columns: 290px 1fr; gap: 1.25rem; align-items: start; margin-top: 1rem; }
.sp-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.sp-side .card { padding: .75rem; }
.sp-progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: .35rem 0 .15rem; }
.sp-progress > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.sp-mod { margin-bottom: .35rem; border-radius: 8px; }
.sp-mod > button { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; padding: .5rem .55rem; border-radius: 8px; cursor: pointer; display: flex; gap: .5rem; align-items: flex-start; }
.sp-mod > button:hover { background: var(--brand-weak); }
.sp-mod.is-open > button { background: var(--brand-weak); }
.sp-mod .code { font-weight: 700; color: var(--brand); font-size: .8rem; min-width: 1.9rem; }
.sp-mod .t { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.sp-mod .sub { font-size: .74rem; color: var(--ink-2); font-weight: 400; }
.sp-mod.is-locked { opacity: .55; }
.sp-items { list-style: none; margin: .1rem 0 .4rem 2.3rem; padding: 0; }
.sp-items a { display: flex; gap: .4rem; align-items: flex-start; padding: .28rem .35rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .84rem; line-height: 1.3; }
.sp-items a:hover, .sp-items a.is-active { background: #eef2f7; }
.sp-dot { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line); }
.sp-dot.done { background: var(--ok); border-color: var(--ok); }
.sp-dot.submitted { background: var(--warn-weak); border-color: var(--warn); }
.sp-dot.rework { background: var(--danger-weak); border-color: var(--danger); }
.sp-kind { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-left: auto; }
.sp-content .card { padding: 1.25rem 1.5rem; }
.sp-content h1 { margin-top: 0; font-size: 1.35rem; }
.sp-crumb { font-size: .8rem; color: var(--ink-2); margin-bottom: .25rem; }
.sp-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.sp-actions .spacer { flex: 1; }
.btn--ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn--sm { padding: .35rem .7rem; font-size: .82rem; }
.chip-ok { background: var(--ok-weak); color: var(--ok); }
.chip-warn { background: var(--warn-weak); color: var(--warn); }
.chip-bad { background: var(--danger-weak); color: var(--danger); }
.md { font-size: .95rem; line-height: 1.6; }
.md h3 { font-size: 1.05rem; margin: 1.1rem 0 .35rem; }
.md h4, .md h5, .md h6 { font-size: .95rem; margin: .9rem 0 .3rem; }
.md ul, .md ol { margin: .2rem 0 .7rem 1.25rem; padding: 0; }
.md code.mono { background: #eef2f7; padding: .05rem .3rem; border-radius: 4px; font-size: .85em; }
.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md-code { border: 1px solid #1e293b; border-radius: 10px; overflow: hidden; margin: .6rem 0 1rem; background: #0f172a; }
.md-code__bar { display: flex; justify-content: space-between; align-items: center; padding: .35rem .75rem; font-size: .72rem; color: #94a3b8; background: #111c33; }
.md-code pre { margin: 0; padding: .8rem .9rem; overflow-x: auto; font-size: .82rem; line-height: 1.5; color: #e2e8f0; white-space: pre; }
.md-copy { border: 1px solid #334155; background: #1e293b; color: #e2e8f0; border-radius: 6px; font: inherit; font-size: .72rem; padding: .15rem .6rem; cursor: pointer; }
.md-table { overflow-x: auto; margin: .6rem 0 1rem; }
.md-table table { border-collapse: collapse; font-size: .88rem; min-width: 60%; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; vertical-align: top; }
.md-table th { background: #eef2f7; }
.lab-obj { background: var(--brand-weak); border-radius: 10px; padding: .75rem 1rem; margin: .5rem 0 1rem; }
.lab-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1rem; }
.lab-steps li { counter-increment: s; position: relative; padding: .45rem .5rem .45rem 2.4rem; border-bottom: 1px dashed var(--line); }
.lab-steps li::before { content: counter(s); position: absolute; left: .3rem; top: .4rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.lab-steps li.is-ticked { color: var(--ink-3); text-decoration: line-through; }
.lab-steps li input { position: absolute; right: .3rem; top: .6rem; width: auto; }
.sub-box { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin-top: 1rem; background: #fbfcfe; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.stat-card .v { font-size: 1.5rem; font-weight: 700; }
.stat-card .l { font-size: .78rem; color: var(--ink-2); }
table.plain { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.plain th, table.plain td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.plain th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.cert-card { border: 2px solid var(--brand); border-radius: 14px; padding: 1rem 1.25rem; background: linear-gradient(135deg, #f7faff, #fff); display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.verify-card { text-align: center; padding: 2rem 1.5rem; }
.verify-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 999px; font-weight: 700; font-size: 1rem; margin-bottom: 1rem; }
.verify-badge.ok { background: var(--ok-weak); color: var(--ok); }
.verify-badge.bad { background: var(--danger-weak); color: var(--danger); }
.verify-grid { display: grid; grid-template-columns: 180px 1fr; gap: .45rem 1rem; text-align: left; max-width: 560px; margin: 1rem auto 0; font-size: .95rem; }
.verify-grid dt { color: var(--ink-2); }
.verify-grid dd { margin: 0; font-weight: 600; }
.cred { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 1.05rem; background: #0f172a; color: #e2e8f0; padding: .55rem .8rem; border-radius: 8px; display: inline-block; letter-spacing: .03em; }
.hidden { display: none !important; }
@media (max-width: 860px) {
  .sp-layout { grid-template-columns: 1fr; }
  .sp-side { position: static; max-height: none; }
  .verify-grid { grid-template-columns: 1fr; gap: .1rem; }
  .verify-grid dd { margin-bottom: .5rem; }
}

/* Chips and other inline-block elements must still hide when marked hidden (nav badges). */
[hidden] { display: none !important; }
