/* Direct links, two-course comparison and scroll-safe dialogs */
body:has(dialog[open]){overflow:hidden}.course-dialog,.compare-dialog{max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}.course-dialog{overflow-x:hidden}.course-card.is-comparing{border-color:#86ae38;box-shadow:0 0 0 2px rgba(134,174,56,.18)}.card-bottom{gap:14px;align-items:flex-end}.card-actions{display:grid;justify-items:stretch;gap:7px;min-width:148px}.compare-toggle,.official-link{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:9px;padding:8px 10px;font-size:.75rem;font-weight:800;text-align:center;cursor:pointer}.compare-toggle:hover,.official-link:hover{border-color:#86ae38}.compare-toggle.selected{background:#eef8db;border-color:#86ae38;color:#36570a}.official-link{color:#285d8d;text-decoration:none}.details-button{width:100%}
.compare-tray{position:fixed;z-index:35;left:50%;bottom:18px;transform:translateX(-50%);width:min(1040px,calc(100% - 32px));display:grid;grid-template-columns:auto 1fr 1fr auto auto;gap:10px;align-items:center;background:#0b1f33;color:#fff;border:1px solid rgba(255,255,255,.13);border-radius:18px;padding:12px 14px;box-shadow:0 18px 50px rgba(3,16,27,.35)}.compare-tray[hidden]{display:none}.compare-tray-title{display:grid;padding:0 7px}.compare-tray-title span{font-size:.72rem;color:#aebdca}.compare-slot{display:grid;grid-template-columns:26px 1fr;align-items:center;gap:8px;min-width:0;background:#132c43;border:1px dashed #4a6377;border-radius:11px;padding:9px}.compare-slot>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#2a4358;font-size:.75rem;font-weight:800}.compare-slot p{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.8rem;color:#aebdca}.compare-slot.filled{border-style:solid;border-color:#86ae38}.compare-slot.filled>span{background:#c7f36b;color:#0b1f33}.compare-slot.filled p{color:#fff}.compare-tray .compare-clear{color:#c9d4dd}.compare-tray .primary-button:disabled{opacity:.45;cursor:not-allowed}
.compare-dialog{width:min(1120px,calc(100% - 28px));border:0;border-radius:22px;padding:0;box-shadow:0 30px 90px rgba(0,0,0,.32)}.compare-dialog::backdrop{background:rgba(5,20,33,.68);backdrop-filter:blur(4px)}.compare-dialog-body{padding:30px}.compare-dialog-body h2{margin:3px 46px 24px 0;font-size:1.8rem}.compare-table{border:1px solid var(--line);border-radius:14px;overflow:hidden}.compare-table-head,.compare-row{display:grid;grid-template-columns:170px repeat(2,minmax(0,1fr))}.compare-table-head{background:var(--ink);color:#fff}.compare-table-head>span,.compare-table-head>div,.compare-row>*{padding:14px 16px}.compare-table-head>div{display:grid;gap:3px;border-left:1px solid rgba(255,255,255,.15)}.compare-table-head b{line-height:1.25}.compare-table-head small{color:#b9c8d4}.compare-row:nth-child(odd){background:#f6f8fa}.compare-row>*+*{border-left:1px solid var(--line)}.compare-row strong{font-size:.83rem;color:#52616d}.compare-row span{line-height:1.35}.compare-links a{font-weight:800;color:#285d8d;text-underline-offset:3px}
@media(max-width:760px){.card-bottom{align-items:stretch;flex-direction:column}.card-bottom .price{max-width:none}.card-actions{width:100%}.compare-tray{grid-template-columns:1fr 1fr;bottom:8px}.compare-tray-title{grid-column:1/-1;display:flex;justify-content:space-between}.compare-tray .compare-clear{display:none}.compare-tray .primary-button{grid-column:1/-1}.compare-dialog-body{padding:22px 16px}.compare-dialog-body{overflow-x:auto}.compare-table{min-width:760px}.course-dialog,.compare-dialog{max-height:calc(100dvh - 16px)}}
