/* Sooner home website. Page layout only; colours, font, buttons, cards, notices and tables come from
   sooner/sooner.css, which loads after this file. Works at phone width (390px) with no sideways scroll. */
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { margin: 0; font-size: 16px; min-height: 100vh; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--sooner-white); padding: 8px 12px; z-index: 30; border-radius: var(--sooner-radius-sm); }
img { max-width: 100%; }

/* ---------- top bar ---------- */
.bar-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar-nav form { margin: 0; }
.bar-nav .sooner-btn { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.bar-nav a[aria-current="page"] { background: var(--sooner-amber-soft); border-color: var(--sooner-amber); }
@media (max-width: 640px) {
  .bar-nav { gap: 6px; }
  .bar-nav .sooner-btn { min-height: 44px; padding: 6px 10px; font-size: 13px; }
}

/* ---------- page ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 56px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 4px 0 8px; }
h2 { font-size: 1.3rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.lead { font-size: 1.1rem; color: var(--sooner-muted); margin-bottom: 24px; }
.small { color: var(--sooner-muted); font-size: .875rem; }
.off { color: var(--sooner-bad); font-weight: 600; }
.sooner-notice { margin: 0 0 20px; }
.sooner-notice p { margin: 0; }
.sooner-notice label { display: block; margin: 10px 0 6px; font-weight: 600; font-size: 14px; }
.copy { width: 100%; min-height: 44px; padding: 10px 12px; font: 400 14px/1.4 ui-monospace, Menlo, monospace; color: var(--sooner-ink);
  background: var(--sooner-white); border: 1.5px solid #C9CDD6; border-radius: var(--sooner-radius-sm); }
.sooner-btn.sooner-btn-small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.inline { display: inline-flex; margin: 0; vertical-align: middle; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 0; }

/* ---------- log-in and set-password: a calm card in the middle ---------- */
.auth main { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: 40px; }
.sooner-card.auth-card { width: 100%; max-width: 440px; padding: 32px clamp(20px, 5vw, 36px); border-top: 4px solid var(--sooner-amber); }
.auth-logo { display: block; height: 40px; width: auto; margin: 0 0 12px; }
.auth-tag { color: var(--sooner-muted); margin: 0 0 24px; font-weight: 600; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 12px; }
.auth-card form { margin-top: 16px; }
.auth-card .sooner-btn { width: 100%; min-height: 46px; font-size: 16px; }
.auth-card .small { margin-top: 18px; }

/* ---------- forms ---------- */
.sooner-field { margin: 0 0 16px; }
.form-card { max-width: 520px; margin: 16px 0 0; }
.form-card h3 { margin-bottom: 16px; }

/* ---------- home: one welcoming card per module ---------- */
.sooner-card.module { margin: 0 0 24px; padding: 24px; border-top: 4px solid var(--sooner-amber); }
.module-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; justify-content: space-between; }
.module-head h2 { font-size: 1.4rem; margin-bottom: 8px; }
.module-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0; font-size: 14px; }
.app-tiles { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.app-tiles li { display: flex; }
.app-tile {
  display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 18px;
  background: var(--sooner-white); color: var(--sooner-ink); text-decoration: none;
  border: 1px solid var(--sooner-line); border-top: 5px solid var(--app); border-radius: var(--sooner-radius-md);
  transition: transform .12s ease, box-shadow .15s ease;
}
.app-tile:hover { box-shadow: var(--sooner-shadow-lift); transform: translateY(-2px); }
.app-tile:focus-visible { border-radius: var(--sooner-radius-md); }
.app-tile-top { display: flex; align-items: center; gap: 12px; }
.app-tile img { width: 48px; height: 48px; border-radius: 26.7%; flex: none; }
.app-name { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.app-line { color: var(--sooner-muted); font-size: 14px; flex: 1 1 auto; }
.app-go { font-weight: 700; font-size: 14px; color: var(--app); }
.app-tile .sooner-chip { align-self: flex-start; }
@media (prefers-reduced-motion: reduce) { .app-tile { transition: none; } .app-tile:hover { transform: none; } }
.empty { text-align: center; padding: 40px 24px; }

/* ---------- team and admin ---------- */
.panel { margin: 0 0 24px; }
.panel > h2 { margin-bottom: 4px; }
.panel > .small { margin-bottom: 14px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--sooner-radius-md); }
.sooner-table { min-width: 100%; }
.sooner-table td { font-size: 15px; }
.sooner-table caption { caption-side: top; text-align: left; padding: 0 0 10px; color: var(--sooner-muted); font-size: 14px; }
.wide { min-width: 760px; }
.mid { min-width: 560px; }
.state-on, .state-off { display: inline-block; font-weight: 700; margin-right: 6px; }
.state-on { color: var(--sooner-good-text); }
.state-off { color: var(--sooner-bad); }
.leader-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.mini { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; margin-top: 8px; }
.mini label { width: 100%; font-weight: 600; font-size: 13px; color: var(--sooner-muted); margin: 0; }
.mini .sooner-input { flex: 1 1 180px; min-height: 38px; padding: 6px 10px; font-size: 14px; }
.mini .sooner-btn { min-height: 38px; font-size: 14px; }
.log { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--sooner-line); }
.log li:last-child { border-bottom: 0; }
.back { margin-top: 8px; }
.sooner-btn.sooner-btn-small { white-space: nowrap; }
@media (max-width: 640px) {
  main { padding-top: 20px; }
  /* 44 px tap targets on phones (these rules are more specific than the shared one in sooner.css). */
  .sooner-btn.sooner-btn-small, .mini .sooner-input, .mini .sooner-btn { min-height: 44px; }
  .sooner-card.module { padding: 18px 16px; }
  .app-tile { padding: 14px; }
  .app-tile img { width: 40px; height: 40px; }
  .sooner-card.form-card { padding: 18px 16px; }
}

/* ---------- copy boxes (set-password links, student links) ---------- */
.copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.copy-row .copy { flex: 1 1 260px; width: auto; min-width: 0; }
.copy-row .copy-btn { flex: none; min-height: 44px; }
.copy-said { display: block; margin-top: 6px; min-height: 1em; }
.copy-said:empty { margin: 0; min-height: 0; }
.student-link { margin: 20px 0 0; padding: 14px 16px; background: var(--sooner-amber-soft); border-radius: var(--sooner-radius-md); }
.student-link label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 8px; }
.center { justify-content: center; }

/* ---------- the public student page ---------- */
.pub main { max-width: 900px; }
.join-kicker { margin: 0; font-weight: 600; font-size: 14px; }
.join-tiles { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.join-foot { margin-top: 24px; }

/* ---------- tables become cards on a phone ---------- */
/* Each cell carries data-label with its column name; the monitoring table's labels are below (fixed columns). */
@media (max-width: 640px) {
  .scroll:has(> .stack) { overflow: visible; }
  .sooner-table.stack, .sooner-table.stack.wide, .sooner-table.stack.mid { min-width: 0; width: 100%; border: 0; box-shadow: none; background: transparent; }
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stack, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack tr { background: var(--sooner-white); border: 1px solid var(--sooner-line); border-radius: var(--sooner-radius-md); padding: 6px 14px; margin: 0 0 12px; }
  .stack td, .stack tr:last-child td { border: 0; padding: 8px 0; }
  .stack td + td { border-top: 1px solid var(--sooner-line); }
  .stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--sooner-muted); margin-bottom: 2px; }
  .watch td::before { display: block; font-size: 12px; font-weight: 700; color: var(--sooner-muted); margin-bottom: 2px; }
  .watch td:nth-child(1)::before { content: "Module"; }
  .watch td:nth-child(2)::before { content: "Leaders"; }
  .watch td:nth-child(3)::before { content: "Teachers"; }
  .watch td:nth-child(4)::before { content: "Last portal log-in"; }
  .watch td:nth-child(5)::before { content: "Module Manager"; }
  .watch td:nth-child(6)::before { content: "Virtual Lecturer"; }
  .watch td:nth-child(7)::before { content: "Classroom Facilitator"; }
  .watch td:nth-child(8)::before { content: "Self-Paced Classroom"; }
  .watch td[colspan]::before { content: none; }
  .mini .sooner-input { flex-basis: 100%; }
  /* Links on their own line in a table cell ("Team page", "Student page"): 44 px to tap. */
  .sooner-table td > a { display: inline-flex; align-items: center; min-height: 44px; }
}
