:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f4f6f8;
  color: #17212b;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
}

button,
input {
  font: inherit;
}

button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #226246;
  background: #226246;
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: #184c36;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #226246;
  background: #226246;
  color: #ffffff;
  text-decoration: none;
}

.auth-link:hover {
  background: #184c36;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
video:focus-visible {
  outline: 3px solid #f0b429;
  outline-offset: 2px;
}

button[hidden],
[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: #ffffff;
  border-bottom: 1px solid #d9dee6;
}

.brand {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 1rem;
}

.brand span,
.session-strip,
.eyebrow,
.section-heading span,
.notice {
  color: #5a6978;
  font-size: 0.875rem;
}

.session-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 20px;
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.auth-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #d9dee6;
}

.auth-panel-wide {
  grid-column: 1 / -1;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: 1.2rem;
}

label {
  color: #354656;
  font-size: 0.875rem;
  font-weight: 700;
}

input {
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid #aeb9c6;
  background: #ffffff;
}

.notice {
  grid-column: 1 / -1;
  min-height: 22px;
}

.portal-view {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.rail {
  position: sticky;
  top: 16px;
  display: grid;
  align-self: start;
  gap: 8px;
}

.nav-button {
  width: 100%;
  border-color: #c8d0da;
  background: #ffffff;
  color: #17212b;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  border-color: #226246;
  background: #e9f4ef;
}

.portal-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.course-head,
.panel {
  background: #ffffff;
  border: 1px solid #d9dee6;
}

.course-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 24px;
  padding: 24px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  align-self: stretch;
  margin: 0;
  overflow: hidden;
  background: #d9dee6;
  border: 1px solid #d9dee6;
}

.metrics div {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  background: #f8fafc;
}

.metrics dt {
  color: #5a6978;
  font-size: 0.8125rem;
}

.metrics dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.25rem;
  font-weight: 800;
}

.panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-list {
  display: grid;
  gap: 14px;
}

.module {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid #e1e6ed;
  background: #fbfcfd;
}

.module h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.module p {
  color: #445565;
  line-height: 1.55;
}

.asset-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.asset-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #bac5d1;
  color: #123f8c;
  background: #ffffff;
  text-decoration: none;
}

.video-frame {
  display: grid;
  gap: 8px;
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #18212b;
}

.updates {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.updates li {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e1e6ed;
}

.updates time {
  color: #5a6978;
  font-size: 0.8125rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e1e6ed;
  vertical-align: top;
}

th {
  color: #526170;
  font-size: 0.8125rem;
  text-transform: uppercase;
}

td {
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #c3ccd6;
  background: #eef2f6;
}

.status-pill.published {
  border-color: #9cc7b3;
  background: #e9f4ef;
}

@media (max-width: 900px) {
  .auth-view,
  .portal-view,
  .course-head,
  .module {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-button {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .topbar,
  .section-heading,
  .session-strip {
    display: grid;
    align-items: stretch;
  }

  .rail,
  .metrics {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 0.875rem;
  }
}
