:root {
  --blue: #13549b;
  --neutral: #929295;
  --ink: #000000;
  --cyan: #9ccdcb;
  --gold: #eb9815;
  --surface: #f5f7f8;
  --panel: #ffffff;
  --line: #d9dadd;
  --muted: #626265;
  --red: #b42318;
  --shadow: 0 18px 46px rgba(25, 35, 55, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family:
    Lato,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 5px solid var(--blue);
}

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-height: 34px;
  padding: 5px clamp(18px, 4vw, 56px);
  color: #fff;
  background: var(--blue);
}

.utility-bar p {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.utility-bar a {
  padding: 5px 11px;
  border: 2px solid #fff;
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: min(340px, 40vw);
  max-height: 66px;
  object-fit: contain;
}

.topnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.topnav a {
  padding: 8px 0;
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-transform: uppercase;
}

.topnav a:hover {
  color: var(--gold);
}

.sign-out-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sign-out-button:hover {
  color: #fff;
  background: var(--blue);
}

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100vh - 127px);
  padding: clamp(28px, 6vw, 72px);
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98),
      rgba(246, 247, 248, 0.94)
    ),
    radial-gradient(
      circle at 78% 35%,
      rgba(156, 205, 203, 0.26),
      transparent 32%
    ),
    linear-gradient(135deg, rgba(19, 84, 155, 0.08), transparent 44%);
}

.login-copy {
  max-width: 760px;
}

.login-instructions {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.info-strip span {
  padding: 8px 12px;
  border: 1px solid rgba(19, 84, 155, 0.18);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(156, 205, 203, 0.18);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-family: Oswald, Lato, sans-serif;
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 10px;
  font-family: Lato, sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-copy p:not(.eyebrow),
.library-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.login-instructions p {
  margin: 0;
}

.support-note {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 720px;
  margin: 6px 0 0;
  color: #5f6368;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.support-note a {
  color: var(--blue);
}

.login-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

input {
  width: 100%;
  height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

input:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(19, 84, 155, 0.18);
}

.form-error,
.form-success {
  min-height: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.form-error {
  color: var(--red);
}

.form-success {
  color: #1f6f48;
}

.primary-button,
.secondary-button,
.filter-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--gold);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.primary-button:hover,
.filter-button:hover {
  background: #d7810e;
}

.secondary-button {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: #fff;
}

.secondary-button:hover {
  color: #fff;
  background: var(--blue);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.portal-view {
  min-height: calc(100vh - 127px);
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  padding: clamp(26px, 4vw, 46px) clamp(18px, 5vw, 72px);
  color: var(--ink);
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.96),
      rgba(245, 247, 248, 0.9)
    ),
    linear-gradient(90deg, rgba(19, 84, 155, 0.12), rgba(156, 205, 203, 0.2));
}

.hero-copy h1 {
  max-width: 780px;
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
}

.library-stat {
  min-width: 170px;
  padding: 16px 18px;
  border-left: 6px solid var(--cyan);
  background: #fff;
  box-shadow: var(--shadow);
}

.library-stat span {
  display: block;
  color: var(--blue);
  font-family: Oswald, Lato, sans-serif;
  font-size: 48px;
  line-height: 0.95;
  font-weight: 700;
}

.library-stat p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.library-shell {
  padding: clamp(20px, 3vw, 34px) clamp(18px, 5vw, 72px) 72px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 460px) minmax(260px, 340px);
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.filter-actions {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.compact-button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  color: var(--blue);
  background: #fff;
  white-space: nowrap;
}

.compact-button:hover {
  color: #fff;
  background: var(--blue);
}

.filter-bar h2 {
  margin-bottom: 4px;
}

.filter-bar p {
  margin: 0;
  color: var(--muted);
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-filter {
  position: relative;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 16px;
  text-align: center;
  white-space: nowrap;
}

.filter-button::after {
  content: "";
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 7px solid currentColor;
  transform: translateY(1px);
}

.section-menu {
  position: absolute;
  right: 0;
  z-index: 15;
  display: grid;
  gap: 2px;
  width: min(330px, 88vw);
  max-height: 360px;
  margin-top: 8px;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.section-option {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

.section-option:hover {
  background: rgba(156, 205, 203, 0.2);
}

.section-option input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.loading-state {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.source-note {
  min-height: 20px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.source-note.warning {
  color: var(--red);
}

.about-course {
  margin: 0 0 28px;
  padding: clamp(22px, 3vw, 34px);
  border-left: 6px solid var(--cyan);
  border-radius: 8px;
  background: #eef7f8;
  box-shadow: 0 14px 34px rgba(25, 35, 55, 0.08);
}

.about-course h2 {
  margin-bottom: 12px;
  color: var(--blue);
}

.about-course p {
  max-width: 1180px;
  margin: 0 0 16px;
  color: #3f4b56;
  font-size: 16px;
  line-height: 1.65;
}

.about-course ul {
  display: grid;
  gap: 7px;
  max-width: 1120px;
  margin: 4px 0 20px 22px;
  padding: 0;
  color: #3f4b56;
  font-size: 15px;
  line-height: 1.45;
}

.about-contact {
  margin-top: 24px !important;
  text-align: center;
}

.section-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.workshop-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25, 35, 55, 0.09);
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #e9eef2;
  background: #fff;
}

.section-heading h3 {
  margin: 0;
  color: #0f3e72;
  font-family: Lato, sans-serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.session-meta {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.session-meta div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
}

.session-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-meta dd {
  margin: 0;
  color: #35424f;
  font-size: 13px;
  line-height: 1.4;
}

.workshop-content {
  display: grid;
  gap: 0;
}

.recording-card {
  display: grid;
  gap: 0;
  color: inherit;
  background: #f8fafb;
}

.material-link:hover strong {
  color: var(--gold);
}

.recording-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(19, 84, 155, 0.94), rgba(0, 0, 0, 0.78)),
    linear-gradient(45deg, rgba(156, 205, 203, 0.3), transparent);
}

.recording-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.recording-media a {
  color: #fff;
  font-weight: 900;
}

.recording-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recording-body {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 14px 16px 16px;
  border-bottom: 1px solid #e9eef2;
  background: #fff;
}

.recording-body strong,
.material-text strong {
  display: block;
  color: var(--blue);
  font-size: 15px;
  line-height: 1.3;
}

.recording-body small,
.material-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.material-list {
  display: grid;
  border-top: 1px solid #e9eef2;
}

.material-link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 16px;
  color: inherit;
  background: #fff;
  border-bottom: 1px solid #e9eef2;
  text-decoration: none;
}

.material-link:last-child {
  border-bottom: 0;
}

.material-link:hover {
  background: #f8fbfd;
}

.material-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 76px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(19, 84, 155, 0.09);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.material-slides .material-type,
.material-pdf .material-type {
  color: #0f5d78;
  background: rgba(156, 205, 203, 0.24);
}

.material-handout .material-type,
.material-resource .material-type {
  color: #5b4717;
  background: rgba(235, 152, 21, 0.17);
}

.material-evaluation .material-type {
  color: #1f6f48;
  background: rgba(31, 111, 72, 0.12);
}

.material-arrow {
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}

.resource-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(19, 84, 155, 0.94), rgba(0, 0, 0, 0.78)),
    linear-gradient(45deg, rgba(156, 205, 203, 0.3), transparent);
}

.resource-media iframe,
.resource-media video {
  width: 100%;
  height: 100%;
  border: 0;
}

.resource-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
}

.youtube-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.42));
}

.play-badge {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 70px;
  height: 50px;
  border-radius: 8px;
  color: #fff;
  background: rgba(19, 84, 155, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.play-badge::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
}

.resource-placeholder {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  font-family: Oswald, Lato, sans-serif;
  font-size: 28px;
  line-height: 1;
}

.resource-body {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
}

.resource-body h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.resource-body a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.resource-meta {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

@media (max-width: 920px) {
  .login-view,
  .library-hero,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .section-list {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    grid-template-columns: minmax(150px, 1fr) auto;
  }

  .library-stat {
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  .utility-bar {
    justify-content: center;
  }

  .info-strip {
    gap: 8px;
  }

  .info-strip span {
    width: 100%;
    text-align: center;
  }

  .utility-bar p {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
  }

  .brand img {
    width: min(250px, 58vw);
  }

  .topnav {
    gap: 8px;
  }

  .topnav a {
    font-size: 13px;
  }

  .login-view {
    min-height: auto;
    padding: 30px 18px;
  }

  h1 {
    font-size: 42px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-heading p {
    white-space: normal;
  }

  .recording-card {
    grid-template-columns: 1fr;
  }

  .recording-media {
    min-height: 160px;
  }

  .material-link {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .material-type {
    grid-column: 1 / -1;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .single-resource-section .resource-grid {
    grid-template-columns: 1fr;
  }
}
