/* Additions for the built portal. Everything else comes from site.css and portal.css, unchanged from the mock-up. */

/* The set-up is server-rendered: ticked choices are real checkboxes, so they work without JavaScript */
label.su-choice { position: relative; cursor: pointer; }
label.su-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.su-choice:has(input:checked) { border-color: var(--accent-line); background: #FBF6EE; }
label.su-choice:has(input:checked) .tick { background: var(--accent-line); border-color: var(--accent-line); }
label.su-choice:has(input:focus-visible) { outline: 2px solid var(--accent-line); outline-offset: 2px; }
.su-nav form { margin: 0; }
.su-note { font-size: 13px; color: var(--fg-2); }
.su-note a, .su-card a { color: var(--accent); }
.su-err p { margin: 0 0 4px; }
.su-ok { margin: 0 0 16px; padding: 12px 16px; border-left: 2px solid var(--accent-line); background: #FBF6EE; color: var(--fg-2); font-size: 14.5px; }
.su-card .field input[aria-invalid="true"] { border-color: #9A3B2E; }
.su-card form.btns { margin-top: 12px; }

/* The heading takes focus so a screen reader starts at the new question; it needs no visible ring */
.su-card h2:focus, .su-card h2:focus-visible { outline: none; box-shadow: none; }

/* A card that has just been opened from the diagram */
.pa-card.flash, .pa-ev.flash { box-shadow: 0 0 0 2px var(--accent-line); transition: box-shadow .4s; }
.nt-meta form { display: inline; margin: 0; }

/* Log out, the last item of the bar: a form button drawn like the links above it */
.side-out { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid rgba(216,207,188,.12); }
.side-out button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--fg); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.side-out button:hover { background: rgba(216,207,188,.05); }
.side-out button:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
@media (min-width: 961px) {
  .shell.is-rail .side-out button { justify-content: center; padding: 11px 0; }
}

/* Library: the Save button is a small form so it works without JavaScript */
.lib-save-f { display: inline; margin: 0; }
a.lib-clear { justify-self: start; }
.lib-reader.is-loading { opacity: .55; transition: opacity .15s; }

/* Account: each change opens under its card, without leaving the page */
.ac-more { display: grid; gap: 10px; }
.ac-more > summary { list-style: none; cursor: pointer; justify-self: start; }
.ac-more > summary::-webkit-details-marker { display: none; }
.ac-more[open] > summary { opacity: .7; }
.ac-more .su-form { padding: 14px 0 4px; }
.ac-list form, .btns form { display: inline; margin: 0; }
.pa-msg.is-problem { color: #9A3B2E; }
.ac-close .confirm { margin-top: 8px; }

/* Toolkits: both layouts are drawn and the chosen one shows */
#tkBody[data-tk-layout="grid"] .tk-lrows { display: none; }
#tkBody[data-tk-layout="list"] .tk-shelf { display: none; }
.tk-save-f { display: inline; margin: 0; }
.tk-viewm-p a[role="button"] { display: block; text-decoration: none; color: inherit; }
.tk-howto-d { display: contents; }
.tk-howto-d > summary { list-style: none; cursor: pointer; }
.tk-howto-d > summary::-webkit-details-marker { display: none; }
.tk-howto-d[open] > .tk-help { flex-basis: 100%; }

/* The Map's Download PDF and Send a copy: each opens a small form under the buttons */
.mv-acts { align-items: flex-start; }
.mv-more > summary.btn { width: 100%; }
.mv-form { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border: 1px solid rgba(216,207,188,.22); }
.mv-form .note { color: #B4AE9F; font-size: 12.5px; }
.mv-form .field label { color: var(--fg-2, #B4AE9F); }

/* A lesson with its video: the player fills the frame */
.crs-video.has-video { display: block; padding: 0; background: #000; }
.crs-video.has-video::before { display: none; }
.crs-video.has-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
