/* GU Learn: the student panel. Colours, fonts and the logo come from ../admin-ui/theme.css, so branding
   changes made in the admin panel (Branding & settings) show here too. Layout only lives in this file.
   The faculty panel (../faculty-ui) uses the same page frame, with its own additions in faculty.css. */

body { margin: 0; background: var(--page-bg); color: var(--text); font-family: var(--font-body); }

.s-app { min-height: 100vh; display: flex; }
.s-side { position: sticky; top: 0; width: 244px; height: 100vh; flex-shrink: 0; box-sizing: border-box; padding: 22px 14px 18px; display: flex; flex-direction: column; gap: 22px; background: var(--dark-bg); color: var(--dark-text); }
.s-side .s-brand img { width: 184px; height: auto; }
.s-side .s-brand span { display: block; margin-top: 6px; font-size: 12px; color: var(--dark-text-muted); }
.s-nav { display: flex; flex-direction: column; gap: 2px; }
.s-nav a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--dark-text-secondary); text-decoration: none; }
.s-nav a:hover { background: var(--dark-raised); color: var(--dark-text); }
.s-nav a[aria-current] { background: var(--dark-raised); color: var(--text-inverse); }
.s-nav a[aria-current] svg { color: var(--brand-primary-on-dark); }
.s-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--dark-line); font-size: 13px; }
.s-me a { color: var(--dark-link); font-size: 12px; }

.s-main { flex-grow: 1; min-width: 0; }
.s-top { display: none; }
.s-content { max-width: 1100px; margin: 0 auto; box-sizing: border-box; padding: 32px 36px 56px; display: flex; flex-direction: column; gap: 24px; }
.s-tabs { display: none; }

.s-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.s-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: start; }
.s-two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.s-h1 { margin: 0; font-family: var(--font-display); font-size: 36px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.s-h2 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 500; }
.s-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-primary-text); }
.s-muted { font-size: 13px; color: var(--text-secondary); }
.s-row { display: flex; align-items: center; gap: 12px; }
.s-bar { height: 8px; border-radius: 4px; background: var(--fill-muted); overflow: hidden; }
.s-bar > span { display: block; height: 8px; border-radius: 4px; background: var(--chart-1); }
.s-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-subtle); color: var(--text); text-decoration: none; }
.s-item:first-child { border-top: 0; }
a.s-item:hover .s-item-title { text-decoration: underline; }
.s-item-title { font-size: 14px; font-weight: 600; }
/* The admin theme keeps button text on one line; list rows and session headers here need to wrap */
button.s-item, button[data-toggle], button[data-ask], button[data-join-demo], button[data-ics], button[data-offline] { white-space: normal; text-align: left; }

/* Inside the phone preview (phone.html) there is no desktop scrollbar, as on a real phone */
.s-framed { scrollbar-width: none; }
.s-framed::-webkit-scrollbar { display: none; }

/* Sign-in: the brand beside the form on wide screens, a short band above it on phones */
.s-login { min-height: 100vh; display: flex; background: var(--page-bg); }
.s-login-brand { flex: 1 1 50%; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px 48px; background: var(--dark-bg); color: var(--dark-text); }
.s-login-brand img { width: 240px; height: auto; }
.s-login-intro { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.s-login-intro h1 { margin: 0; font-family: var(--font-display); font-size: 40px; font-weight: 500; line-height: 1.1; color: var(--text-inverse); }
.s-login-intro p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--dark-text-secondary); }
.s-login-foot { font-size: 12px; color: var(--dark-text-muted); }
.s-login-form { flex: 1 1 50%; min-width: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.s-login-form > * { min-width: 0; }
.s-login-pick { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: left; color: inherit; white-space: normal; cursor: pointer; }
.s-login-pick:hover { border-color: var(--brand-primary); }

@media (max-width: 900px) {
  .s-login { flex-direction: column; }
  .s-login-brand { flex: none; gap: 14px; padding: 18px 16px 20px; }
  .s-login-brand img { width: 168px; }
  .s-login-intro { gap: 6px; }
  .s-login-intro h1 { font-size: 24px; }
  .s-login-intro p { font-size: 13px; line-height: 1.5; }
  .s-login-foot { display: none; }
  .s-login-form { flex: none; align-items: flex-start; padding: 22px 16px 40px; }
  .s-login-form h2 { font-size: 26px !important; }
}

@media (max-width: 900px) {
  .s-side { display: none; }
  .s-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--dark-bg); color: var(--dark-text); }
  .s-top img { height: 26px; width: auto; }
  .s-content { padding: 20px 16px 104px; gap: 18px; }
  .s-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .s-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; font-size: 11px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
  .s-tabs a[aria-current] { color: var(--brand-primary-text); }
  .s-two { grid-template-columns: minmax(0, 1fr); }
  .s-h1 { font-size: 28px; }
  .s-card { padding: 16px; border-radius: 12px; }
  .s-hide-phone { display: none !important; }
}
@media (min-width: 901px) { .s-hide-desk { display: none !important; } }

/* Printing (saving a certificate as a PDF): only the certificate */
@media print {
  .s-side, .s-top, .s-tabs, .s-content > :not(.s-card), .s-card > :not(.cert-print) { display: none !important; }
  .s-card { border: 0 !important; padding: 0 !important; }
  body { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
