:root {
  --navy: #082f45;
  --navy-deep: #041e2c;
  --navy-soft: #124863;
  --blue: #227fab;
  --blue-bright: #35a7d7;
  --green: #8cc66d;
  --ink: #152631;
  --muted: #61727e;
  --line: #dbe3e7;
  --surface: #ffffff;
  --surface-soft: #f1f5f7;
  --surface-blue: #e9f4f9;
  --shadow: 0 24px 64px rgba(8, 47, 69, 0.12);
  --shadow-soft: 0 12px 36px rgba(8, 47, 69, 0.08);
  --radius: 22px;
  --max: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 94px;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Avenir Next", "Helvetica Neue", "PingFang TC", "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(219, 227, 231, 0.88);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(calc(100% - 32px), var(--max));
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.brand img {
  width: 150px;
  height: 75px;
  object-fit: contain;
}

.brand__divider {
  width: 1px;
  height: 30px;
  background: var(--line);
}

.brand__academy {
  display: grid;
  gap: 1px;
}

.brand__academy b {
  color: var(--navy);
  font-size: 13px;
  letter-spacing: 0.16em;
}

.brand__academy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
}

.main-nav a,
.main-nav > button {
  position: relative;
  padding: 10px 12px;
  color: #334a58;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.main-nav a::after,
.main-nav > button::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav > button:hover::after,
.main-nav > button:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.account-area { position: relative; }
.login-button {
  min-height: 42px;
  padding: 0 20px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

/* Language switcher */
.lang-switcher {
  display: inline-flex;
  gap: 4px;
  border-radius: 8px;
  background: rgba(31, 49, 56, 0.1);
  backdrop-filter: blur(4px);
}

.lang-btn {
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7a8c96;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: all 160ms ease;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn[aria-pressed="true"] {
  background: #2f80ed;
  color: #fff;
}
.account-menu-wrap { position: relative; }
.account-avatar {
  width: 44px;
  height: 44px;
  border: 3px solid #dcecf3;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--navy));
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(8, 47, 69, .2);
}
.account-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(8, 47, 69, .2);
}
.account-menu > div { display: grid; gap: 3px; padding: 12px; border-bottom: 1px solid var(--line); }
.account-menu strong { color: var(--navy); }
.account-menu span { color: var(--blue); font-size: 11px; font-weight: 900; }
.account-menu small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.account-menu a,
.account-menu button {
  width: 100%;
  display: block;
  padding: 11px 12px;
  text-align: left;
  color: var(--ink);
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}
.account-menu a:hover,
.account-menu button:hover { color: var(--blue); background: #eef7fa; }

.admin-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  color: #fff;
  background: var(--navy);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.admin-entry:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
}

.academy-hero {
  position: relative;
  overflow: hidden;
  min-height: 670px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(4, 30, 44, 0.98), rgba(8, 47, 69, 0.95) 55%, rgba(18, 72, 99, 0.94)),
    var(--navy);
}

.academy-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.academy-hero__glow {
  position: absolute;
  width: 560px;
  height: 560px;
  right: -160px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 167, 215, 0.35), rgba(53, 167, 215, 0));
  pointer-events: none;
}

.academy-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: clamp(44px, 7vw, 100px);
  min-height: 670px;
  padding-block: 72px 84px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #82d7f5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.eyebrow--dark {
  color: var(--blue);
}

.academy-hero h1 {
  max-width: 720px;
  margin: 22px 0 22px;
  font-size: clamp(2.8rem, 5.6vw, 5.3rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.academy-hero__copy > p {
  max-width: 660px;
  margin: 0;
  color: rgba(234, 246, 251, 0.78);
  font-size: clamp(1rem, 1.5vw, 1.17rem);
  line-height: 1.9;
}

.academy-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--light {
  color: var(--navy);
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.button--outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.button--dark {
  color: #fff;
  background: var(--navy);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 44px;
}

.hero-stats div {
  min-width: 128px;
  padding: 0 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.hero-stats span {
  margin-top: 7px;
  color: rgba(234, 246, 251, 0.65);
  font-size: 12px;
  font-weight: 700;
}

.academy-hero__visual {
  position: relative;
  min-height: 500px;
}

.hero-photo {
  position: absolute;
  inset: 14px 0 14px 46px;
  overflow: hidden;
  border-radius: 28px 28px 100px 28px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.3);
}

.hero-photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(4, 30, 44, 0.55));
}

.hero-photo img,
.hero-photo video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

.hero-video-control {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.hero-video-control .icon {
  width: 20px;
  height: 20px;
}

.hero-video-control:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(130, 215, 245, 0.35);
  border-radius: 50%;
}

.hero-orbit--one {
  width: 190px;
  height: 190px;
  right: -70px;
  bottom: 0;
}

.hero-orbit--two {
  width: 110px;
  height: 110px;
  left: 4px;
  top: 0;
}

.announcement {
  color: #dcebf2;
  background: var(--navy-deep);
}

.announcement__inner {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-block: 12px;
}

.announcement span {
  color: #6fc7e9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.announcement p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.announcement a,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 850;
}

.announcement a .icon,
.text-link .icon {
  transition: transform 160ms ease;
}

.announcement a:hover .icon,
.text-link:hover .icon {
  transform: translateX(4px);
}

.section {
  padding-block: clamp(76px, 9vw, 122px);
}

.learning-overview {
  padding-block: 58px;
  background: linear-gradient(135deg, #edf7fa, #f8fbfc 60%, #eef5f8);
  border-bottom: 1px solid var(--line);
}
.learning-overview__header { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.learning-overview__header h2 { margin: 12px 0 7px; color: var(--navy); font-size: clamp(1.8rem, 3vw, 2.7rem); }
.learning-overview__header p { margin: 0; color: var(--muted); }
.history-filter { display: flex; align-items: end; gap: 8px; }
.history-filter label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 850; }
.history-filter input { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; }
.history-filter button { min-height: 42px; padding: 0 16px; color: #fff; border: 0; border-radius: 9px; background: var(--navy); cursor: pointer; font-weight: 850; }
.learning-overview__body { display: grid; grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr); gap: 18px; margin-top: 28px; }
.learning-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.learning-summary__card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-content: center;
  gap: 6px 12px;
  min-height: 218px;
  overflow: hidden;
  padding: 25px 22px 21px;
  text-align: left;
  color: var(--navy);
  border: 2px solid;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(8, 47, 69, .09);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.learning-summary__card::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: currentColor; }
.learning-summary__card.is-completed { color: #08754f; border-color: #8bcbb1; background: linear-gradient(145deg, #fff, #e7f7ef); }
.learning-summary__card.is-pending { color: #a94e06; border-color: #efb271; background: linear-gradient(145deg, #fff, #fff1df); }
.learning-summary__card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(8, 47, 69, .14); }
.learning-summary__icon { width: 44px; height: 44px; display: grid; place-items: center; grid-row: 1 / span 2; color: #fff; border-radius: 50%; }
.learning-summary__card.is-completed .learning-summary__icon { background: #08754f; }
.learning-summary__card.is-pending .learning-summary__icon { background: #a94e06; }
.learning-summary__icon .icon { width: 25px; height: 25px; color: #fff; }
.learning-summary__card > span { align-self: end; color: currentColor; font-size: 14px; font-weight: 950; letter-spacing: .04em; }
.learning-summary__card strong { align-self: start; color: currentColor; font-size: 2.5rem; line-height: 1; }
.learning-summary__card small { grid-column: 1 / -1; margin-top: 7px; color: #425863; font-weight: 700; line-height: 1.5; }
.learning-summary__card em { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; padding-top: 12px; border-top: 1px solid currentColor; font-size: 10px; font-style: normal; font-weight: 900; }
.learning-summary__card em .icon { font-size: 17px; }
.learning-history { min-height: 180px; padding: 20px; border: 1px solid #d1e2e9; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(8, 47, 69, .06); }
.learning-history__heading { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--navy); }
.learning-history__heading span { color: var(--muted); font-size: 11px; }
.learning-history__list { max-height: 220px; overflow: auto; }
.learning-history__list article { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf1f3; }
.learning-history__list article > span { color: var(--muted); font-size: 11px; }
.learning-history__list article div { display: grid; gap: 3px; }
.learning-history__list article b { color: var(--navy); font-size: 13px; }
.learning-history__list article small { color: var(--muted); }
.learning-history__empty { margin: 30px 0; text-align: center; color: var(--muted); font-size: 13px; }

.section--soft {
  background:
    radial-gradient(circle at 90% 10%, rgba(34, 127, 171, 0.09), transparent 28%),
    var(--surface-soft);
}

.section--catalog {
  background: #f8fafb;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: 50px;
}

.section-heading h2 {
  margin: 16px 0 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading--split > p {
  margin: 0;
  padding-bottom: 5px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.type-card {
  position: relative;
  min-height: 218px;
  overflow: hidden;
  padding: 24px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.type-card::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -42px;
  bottom: -42px;
  border-radius: 50%;
  background: var(--type-tint, #e8f4f9);
  transition: transform 200ms ease;
}

.type-card:hover,
.type-card.is-active {
  transform: translateY(-6px);
  border-color: rgba(34, 127, 171, 0.45);
  box-shadow: var(--shadow-soft);
}

.type-card:hover::before {
  transform: scale(1.18);
}

.type-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--type-color, var(--blue));
  border-radius: 15px;
  background: var(--type-tint, #e8f4f9);
  font-size: 25px;
}

.type-card small,
.type-card strong,
.type-card span {
  position: relative;
  z-index: 1;
  display: block;
}

.type-card strong {
  margin-top: 24px;
  font-size: 1.08rem;
}

.type-card small {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.type-card span {
  margin-top: 18px;
  color: var(--type-color, var(--blue));
  font-size: 12px;
  font-weight: 900;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.topic-card {
  min-height: 248px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px;
  text-align: left;
  border: 1px solid rgba(8, 47, 69, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(8, 47, 69, 0.04);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.topic-card:hover {
  color: #fff;
  background: var(--navy);
  transform: translateY(-5px);
}

.topic-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border-radius: 14px;
  background: var(--surface-blue);
  font-size: 23px;
}

.topic-card h3 {
  margin: 26px 0 9px;
  font-size: 1.08rem;
}

.topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.topic-card:hover p {
  color: rgba(255, 255, 255, 0.7);
}

.topic-card small {
  margin-top: auto;
  padding-top: 20px;
  color: var(--blue);
  font-weight: 850;
}

.topic-card:hover small {
  color: #82d7f5;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  min-height: 470px;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.featured-layout__media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: var(--navy-deep);
}

.featured-layout__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(8, 47, 69, 0.38));
}

.featured-layout__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.featured-layout__play {
  position: absolute;
  z-index: 2;
  left: 34px;
  bottom: 34px;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: #fff;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.featured-layout__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 64px);
}

.featured-layout__tag {
  color: #82d7f5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.featured-layout h3 {
  margin: 18px 0 16px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.18;
}

.featured-layout p {
  margin: 0;
  color: rgba(234, 246, 251, 0.72);
  line-height: 1.8;
}

.featured-layout__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.featured-layout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.featured-layout__body .featured-layout__actions .button {
  align-self: flex-start;
  margin-top: 0;
}

.catalog-progress-tabs {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #cfe0e7;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fbfd 0%, #eef6f9 100%);
  box-shadow: 0 8px 26px rgba(8, 47, 69, 0.05);
}

.catalog-progress-tabs[hidden] {
  display: none;
}

.catalog-progress-tabs__heading {
  display: grid;
  gap: 3px;
}

.catalog-progress-tabs__heading span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.catalog-progress-tabs__heading strong {
  color: var(--navy);
  font-size: 15px;
}

.catalog-progress-tabs__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(142px, 1fr));
  gap: 10px;
}

.catalog-progress-tab {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 13px;
  border: 2px solid currentColor;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.catalog-progress-tab:hover {
  transform: translateY(-1px);
}

.catalog-progress-tab:focus-visible {
  outline: 3px solid rgba(34, 127, 171, 0.26);
  outline-offset: 2px;
}

.catalog-progress-tab .icon {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
}

.catalog-progress-tab strong {
  min-width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  padding-inline: 7px;
  border-radius: 999px;
  background: currentColor;
  font-size: 11px;
  line-height: 1;
}

.catalog-progress-tab.is-pending {
  color: #a35605;
  border-color: #e7ad5d;
}

.catalog-progress-tab.is-completed {
  color: #16724b;
  border-color: #69bc94;
}

.catalog-progress-tab.is-pending strong {
  color: #fff;
  background: #b96005;
}

.catalog-progress-tab.is-completed strong {
  color: #fff;
  background: #16724b;
}

.catalog-progress-tab.is-pending.is-active {
  color: #fff;
  border-color: #a95600;
  background: #a95600;
  box-shadow: 0 9px 22px rgba(169, 86, 0, 0.24);
}

.catalog-progress-tab.is-completed.is-active {
  color: #fff;
  border-color: #126a45;
  background: #126a45;
  box-shadow: 0 9px 22px rgba(18, 106, 69, 0.24);
}

.catalog-progress-tab.is-active strong {
  color: currentColor;
  background: rgba(255, 255, 255, 0.2);
}

.catalog-progress-tabs__clear {
  padding: 10px 4px;
  color: var(--blue);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalog-progress-tabs__clear[hidden] {
  display: none;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 160px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(8, 47, 69, 0.05);
}

.search-field {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #f8fafb;
}

.search-field .icon {
  font-size: 20px;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.select-field {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.select-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.select-field select {
  width: 100%;
  padding: 0 22px 0 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 750;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.filter-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.filter-chip small {
  min-width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  color: var(--navy);
  border-radius: 999px;
  background: #e9f1f5;
  font-size: 10px;
  line-height: 1;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.filter-chip:hover small,
.filter-chip.is-active small {
  color: var(--navy);
  background: #fff;
}

.catalog-meta {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 28px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-meta strong {
  color: var(--navy);
  font-size: 1.2rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.resource-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(8, 47, 69, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.resource-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 127, 171, 0.36);
  box-shadow: var(--shadow-soft);
}

.resource-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}

.resource-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.resource-card:hover .resource-card__media img {
  transform: scale(1.035);
}

.resource-card__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 80% 10%, rgba(130, 215, 245, 0.28), transparent 30%),
    linear-gradient(135deg, var(--navy), var(--blue));
  font-size: 58px;
}

.resource-type-badges {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 28px);
}

.resource-type-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 30px;
  padding: 7px 11px;
  color: #fff;
  border-radius: 999px;
  background: #314b5c;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(3, 28, 41, 0.24);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.resource-type-badge .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke-width: 1.9;
}

.resource-type-badge--video { background: #0f6688; }
.resource-type-badge--pdf { background: #b72f3a; }
.resource-type-badge--word { background: #2455a3; }
.resource-type-badge--excel { background: #1e6b49; }
.resource-type-badge--ppt { background: #b84e1f; }
.resource-type-badge--image { background: #6848b8; }

@media (max-width: 420px) {
  .resource-type-badges {
    left: 10px;
    top: 10px;
    max-width: calc(100% - 20px);
    gap: 5px;
  }

  .resource-type-badge {
    min-height: 27px;
    padding: 6px 8px;
    font-size: 10px;
  }
}

.resource-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.resource-card__topic {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.resource-card h3 {
  margin: 11px 0 10px;
  color: var(--navy);
  font-size: 1.18rem;
  line-height: 1.45;
}

.resource-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.resource-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
  color: #768791;
  font-size: 11px;
}

.resource-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.resource-card__quiz-badge {
  align-self: flex-start;
  margin-top: 16px;
  padding: 6px 9px;
  color: #176c48;
  border-radius: 999px;
  background: #e8f5ee;
  font-size: 9px;
  font-weight: 900;
}

.resource-card__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 16px; }
.resource-card__badges .resource-card__quiz-badge { margin-top: 0; }
.resource-card__progress-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 7px;
  border: 1px solid;
  border-radius: 999px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}
.resource-card__progress-badge .icon { width: 17px; height: 17px; }
.resource-card__progress-badge.is-completed { color: #08754f; border-color: #86c8ad; background: #e1f5eb; }
.resource-card__progress-badge.is-pending { color: #a94e06; border-color: #efb271; background: #fff0dc; }
.resource-card__progress-badge:hover { filter: saturate(1.15); box-shadow: 0 4px 12px rgba(8, 47, 69, .12); }
.progress-status-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 2px solid;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}
.progress-status-button .icon { width: 19px; height: 19px; }
.progress-status-button.is-completed { color: #d9ffed; border-color: #6ed3a6; background: rgba(9, 111, 76, .45); }
.progress-status-button.is-pending { color: #fff1db; border-color: #efb271; background: rgba(169, 78, 6, .45); }
.resource-card__quiz-action:disabled,
.dialog-quiz-button:disabled,
.featured-layout__actions .button:disabled { cursor: default; opacity: .72; transform: none; }
.footer-login { padding: 0; text-align: left; color: inherit; border: 0; background: transparent; cursor: pointer; font: inherit; }
.youtube-player { width: 100%; height: 100%; min-height: 440px; }

.resource-card__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.resource-card__action {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.resource-card__action:hover {
  background: var(--blue);
}

.resource-card__quiz-action {
  min-height: 44px;
  padding: 10px 13px;
  color: var(--blue);
  border: 1px solid #b7d5e3;
  border-radius: 11px;
  background: #f2f9fc;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.resource-card__quiz-action:hover {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.resource-card__share-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.resource-card__share-action:hover {
  color: var(--blue);
  border-color: #9fcada;
  background: #f5fbfd;
}

.empty-state {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed #c8d4da;
  border-radius: 20px;
  background: #fff;
}

.empty-state > .icon {
  color: var(--blue);
  font-size: 46px;
}

.empty-state h3 {
  margin: 18px 0 8px;
  color: var(--navy);
}

.empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
}

.site-footer {
  padding: 70px 0 22px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--navy-deep);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) 0.6fr 0.6fr;
  gap: 70px;
  padding-bottom: 52px;
}

.site-footer__brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.site-footer__brand img {
  width: 124px;
  height: 54px;
  object-fit: contain;
}

.site-footer__brand .brand__divider {
  background: rgba(255,255,255,.25);
}

.site-footer__brand .brand__academy b,
.site-footer__brand .brand__academy small {
  color: #fff;
}

.site-footer__brand p {
  max-width: 460px;
  margin: 20px 0 0;
  line-height: 1.8;
}

.site-footer__grid > div:not(:first-child) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__grid strong {
  margin-bottom: 8px;
  color: #fff;
  font-size: 13px;
}

.site-footer__grid a,
.site-footer__grid button {
  padding: 0;
  text-align: left;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.site-footer__grid a:hover,
.site-footer__grid button:hover {
  color: #82d7f5;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.resource-dialog {
  width: min(1080px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.34);
}

.resource-dialog::backdrop {
  background: rgba(2, 18, 27, 0.78);
  backdrop-filter: blur(8px);
}

.resource-dialog__shell {
  max-height: calc(100dvh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.resource-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
}

.resource-dialog__type {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.resource-dialog h2 {
  margin: 5px 0 0;
  color: var(--navy);
  font-size: 1.2rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
}

.resource-dialog__viewer {
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow: auto;
  background: #071e2b;
}

.resource-dialog__content {
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.resource-dialog__files {
  width: 310px;
  flex: 0 0 310px;
  overflow-y: auto;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: #f5f8f9;
}

.resource-dialog__files-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.resource-dialog__files-heading b {
  color: var(--blue);
}

.resource-dialog__file-list {
  display: grid;
  gap: 8px;
}

.resource-dialog__file {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 11px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}

.resource-dialog__file:hover,
.resource-dialog__file.is-active {
  border-color: var(--blue);
}

.resource-dialog__file.is-active {
  box-shadow: 0 0 0 3px rgba(34,127,171,.12);
}

.resource-dialog__file > span:first-child {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border-radius: 50%;
  background: #e6f3f9;
  font-size: 9px;
  font-weight: 900;
}

.resource-dialog__file > span:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.resource-dialog__file b,
.resource-dialog__file small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-dialog__file b {
  color: var(--navy);
  font-size: 10px;
}

.resource-dialog__file small {
  color: var(--muted);
  font-size: 9px;
}

.resource-dialog__viewer video,
.resource-dialog__viewer iframe {
  width: 100%;
  height: min(68vh, 700px);
  border: 0;
  background: #000;
}

.document-viewer {
  min-height: 460px;
  display: grid;
  place-items: center;
  padding: 50px 24px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(53, 167, 215, 0.25), transparent 30%),
    var(--navy);
}

.document-viewer__icon {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 24px;
  color: var(--navy);
  background: #fff;
  font-size: 42px;
}

.document-viewer h3 {
  margin: 22px 0 10px;
  font-size: 1.5rem;
}

.document-viewer p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.8;
}

.document-viewer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.image-viewer {
  min-height: 460px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(53, 167, 215, 0.22), transparent 30%),
    var(--navy);
}

.image-viewer__toolbar {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(5, 31, 45, 0.88);
  backdrop-filter: blur(12px);
}

.image-viewer__toolbar button {
  min-width: 42px;
  height: 38px;
  padding: 0 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.image-viewer__toolbar button:hover,
.image-viewer__toolbar button:focus-visible {
  border-color: #82d7f5;
  background: rgba(130, 215, 245, 0.17);
  outline: none;
}

.image-viewer__canvas {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 28px;
}

.image-viewer__canvas img {
  max-width: 100%;
  max-height: min(60vh, 660px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  transform-origin: center;
  transition: transform 160ms ease;
}

.resource-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.dialog-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-weight: 850;
}

.resource-dialog__footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-quiz-button {
  min-height: 38px;
  padding: 8px 14px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.dialog-share-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.dialog-share-button:hover {
  color: var(--blue);
  border-color: #9fcada;
}

.share-dialog {
  width: min(620px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .34);
}

.share-dialog::backdrop {
  background: rgba(2, 18, 27, .76);
  backdrop-filter: blur(8px);
}

.share-dialog__shell > header,
.share-dialog__shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
}

.share-dialog__shell > header {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
}

.share-dialog__shell > header span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}

.share-dialog__shell > header h2 {
  margin: 5px 0 0;
  color: var(--navy);
  font-size: 1.35rem;
}

.share-dialog__body {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #f6f8f9;
}

.share-dialog__body > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.share-dialog__body > p strong {
  color: var(--navy);
}

.share-url-field {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.share-url-field__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.share-url-field input {
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
  font-size: 13px;
}

.share-url-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(34, 127, 171, .12);
}

.share-url-field button {
  padding: 0 17px;
  color: #fff;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.share-dialog__shell > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.share-dialog__shell > footer .button {
  min-height: 42px;
  margin: 0;
}

.admin-login-dialog {
  width: min(520px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .38);
}

.admin-login-dialog__shell {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-login-dialog::backdrop {
  background: rgba(2, 18, 27, .82);
  backdrop-filter: blur(9px);
}

.admin-login-dialog__shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), #145d7e);
}

.admin-login-dialog__shell > header span {
  color: #82d7f5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}

.admin-login-dialog__shell > header h2 {
  margin: 6px 0 5px;
  font-size: 1.5rem;
}

.admin-login-dialog__shell > header p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.admin-login-dialog__shell > header .icon-button {
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .08);
}

.admin-login-form {
  display: grid;
  gap: 16px;
  padding: 26px 24px;
}

.admin-login-form[hidden] {
  display: none;
}

.admin-login-form > label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.admin-login-form input {
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #f8fafb;
  font-size: 14px;
  font-weight: 650;
}

.admin-login-form input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 127, 171, .12);
}

.admin-login-form .button {
  width: 100%;
  min-height: 50px;
  margin: 2px 0 0;
  border: 0;
}

.admin-login-link {
  justify-self: center;
  padding: 4px;
  color: var(--blue);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.admin-login-message {
  min-height: 19px;
  margin: -4px 0 0;
  color: #c13f4b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.admin-login-message.is-success {
  color: #207d55;
}

.admin-login-form__intro b {
  color: var(--navy);
  font-size: 16px;
}

.admin-login-form__intro p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.quiz-dialog {
  --quiz-muted: #4b6270;
  width: min(900px, calc(100% - 32px));
  height: min(860px, calc(100dvh - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .36);
}

.quiz-dialog::backdrop {
  background: rgba(2, 18, 27, .8);
  backdrop-filter: blur(8px);
}

.quiz-dialog__shell {
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quiz-dialog header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
}

.quiz-dialog header span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}

.quiz-dialog header h2 {
  margin: 5px 0 4px;
  color: var(--navy);
  font-size: 1.5rem;
}

.quiz-dialog header p {
  margin: 0;
  color: var(--quiz-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.quiz-form {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.quiz-dialog__body {
  min-height: 0;
  display: grid;
  flex: 1 1 auto;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  padding: 22px 24px 28px;
  background: #f6f8f9;
}

.quiz-learner-name {
  display: grid;
  gap: 7px;
  padding: 16px;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
  font-weight: 900;
}

.quiz-learner-name input {
  min-height: 52px;
  padding: 11px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
}

.quiz-learner-name input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(34, 127, 171, .12);
}

.quiz-learner-name small {
  color: var(--quiz-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.quiz-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  padding: 14px 16px;
  border: 1px solid #c9e0ea;
  border-radius: 13px;
  background: #eaf6fb;
}

.quiz-progress > span {
  grid-row: 1 / 3;
  align-self: center;
  padding: 7px 10px;
  color: #fff;
  border-radius: 999px;
  background: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.quiz-progress b {
  color: var(--navy);
  font-size: 14px;
}

.quiz-progress small {
  color: var(--quiz-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.front-quiz-question {
  min-width: 0;
  min-inline-size: 0;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.front-quiz-question__meta {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
}

.front-quiz-question__meta span,
.front-quiz-question__meta b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.front-quiz-question__meta b {
  flex: 0 0 auto;
  color: var(--quiz-muted);
  font-size: 12px;
}

.front-quiz-question h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.12rem;
  line-height: 1.65;
}

.front-quiz-options {
  display: grid;
  gap: 9px;
}

.front-quiz-options label {
  cursor: pointer;
}

.front-quiz-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.front-quiz-options label > span {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafcfd;
}

.front-quiz-options i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border-radius: 50%;
  background: #e5f2f8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.front-quiz-options b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
}

.front-quiz-options input:checked + span {
  border-color: var(--blue);
  background: #edf7fb;
  box-shadow: 0 0 0 3px rgba(34, 127, 171, .11);
}

.front-quiz-options input:checked + span i {
  color: #fff;
  background: var(--blue);
}

.front-quiz-question.is-wrong {
  border-color: #df5b65;
  background: #fff7f7;
  box-shadow: 0 0 0 4px rgba(216, 77, 87, .1);
}

.front-quiz-question.is-wrong .front-quiz-options input:checked + span {
  border-color: var(--red);
  background: #fdecee;
  box-shadow: none;
}

.front-quiz-question.is-wrong .front-quiz-options input:checked + span i {
  background: var(--red);
}

.front-quiz-question__feedback {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.quiz-result {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 22px;
  border-radius: 15px;
  overflow-wrap: anywhere;
}

.quiz-result > span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.quiz-result h3,
.quiz-result p {
  margin: 0;
}

.quiz-result h3 {
  font-size: 1.5rem;
}

.quiz-result p,
.quiz-result small {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}

.quiz-result--passed {
  color: #176c48;
  border: 1px solid #afd8c4;
  background: #eaf7f0;
}

.quiz-result--failed {
  color: #a2353e;
  border: 1px solid #ebbbc0;
  background: #fff0f1;
}

.quiz-form > footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.quiz-form > footer .button {
  min-width: 132px;
  font-size: 14px;
}

.quiz-dialog .button--outline {
  color: var(--navy);
  border-color: var(--line);
  background: #fff;
}

.loading-screen {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  color: #fff;
  background: var(--navy);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-screen span {
  width: 46px;
  height: 46px;
  margin-inline: auto;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #82d7f5;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.loading-screen p {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
}

.toast {
  position: fixed;
  z-index: 250;
  left: 50%;
  bottom: 24px;
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  color: #fff;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 13px;
  font-weight: 750;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
  .main-nav {
    gap: 0;
  }

  .main-nav a {
    padding-inline: 9px;
    font-size: 13px;
  }

  .academy-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
    gap: 42px;
  }

  .type-grid,
  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .type-card:nth-child(4),
  .type-card:nth-child(5) {
    min-height: 190px;
  }
}

@media (max-width: 880px) {
  .site-header__inner {
    min-height: 74px;
  }

  .brand img {
    width: 150px;
    height: 75px;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(8, 47, 69, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
  }

  .site-header.is-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav a {
    padding: 13px 4px;
    border-bottom: 1px solid #edf1f3;
  }

  .main-nav > button {
    width: 100%;
    padding: 13px 4px;
    text-align: left;
    border-bottom: 1px solid #edf1f3;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .academy-hero__grid {
    grid-template-columns: 1fr;
    gap: 52px;
    padding-block: 64px 72px;
  }

  .academy-hero__copy {
    max-width: 720px;
  }

  .academy-hero__visual {
    min-height: 460px;
  }

  .hero-photo {
    inset: 0 20px 0 54px;
  }

  .announcement__inner {
    grid-template-columns: auto 1fr;
  }

  .announcement a {
    display: none;
  }

  .section-heading--split,
  .featured-layout {
    grid-template-columns: 1fr;
  }

  .section-heading--split {
    gap: 14px;
  }

  .featured-layout__media {
    min-height: 360px;
  }

  .featured-layout__media::after {
    background: linear-gradient(180deg, transparent 60%, rgba(8, 47, 69, 0.3));
  }

  .catalog-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 44px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .catalog-progress-tabs {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }

  .catalog-progress-tabs__buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-progress-tab {
    min-width: 0;
    gap: 7px;
    padding-inline: 9px;
  }

  .catalog-progress-tabs__clear {
    width: 100%;
    padding-block: 4px;
  }

  .container,
  .site-header__inner {
    width: min(calc(100% - 32px), var(--max));
  }

  html {
    scroll-padding-top: 76px;
  }

  .site-header__inner {
    gap: 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand img {
    width: 150px;
    height: 75px;
  }

  .brand__divider {
    height: 25px;
  }

  .brand__academy b {
    font-size: 10px;
  }

  .brand__academy small {
    font-size: 9px;
  }

  .admin-entry {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .admin-entry span {
    display: none;
  }

  .academy-hero {
    min-height: auto;
  }

  .academy-hero__grid {
    min-height: auto;
    gap: 44px;
    padding-block: 52px 58px;
  }

  .academy-hero h1 {
    margin-top: 18px;
    font-size: clamp(2.5rem, 12vw, 3.75rem);
    line-height: 1.06;
  }

  .academy-hero__copy > p {
    font-size: 0.98rem;
    line-height: 1.78;
  }

  .academy-hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .academy-hero__actions .button {
    min-width: 0;
    padding-inline: 12px;
    font-size: 13px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin-top: 36px;
  }

  .hero-stats div {
    min-width: 0;
    padding: 0 12px;
  }

  .hero-stats strong {
    font-size: 1.55rem;
  }

  .hero-stats span {
    font-size: 10px;
  }

  .academy-hero__visual {
    min-height: 350px;
  }

  .hero-photo {
    inset: 0 0 0 26px;
    border-radius: 22px 22px 68px 22px;
  }

  .announcement__inner {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-block: 14px;
  }

  .section {
    padding-block: 72px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .section-heading h2 {
    font-size: 2.25rem;
  }

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

  .type-grid {
    gap: 11px;
  }

  .type-card,
  .type-card:nth-child(4),
  .type-card:nth-child(5) {
    min-height: 0;
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 18px;
  }

  .type-card__icon {
    width: 48px;
    height: 48px;
    grid-row: 1 / span 2;
  }

  .type-card strong,
  .type-card small,
  .type-card span {
    margin: 0;
  }

  .type-card small {
    grid-column: 2;
    font-size: 11px;
  }

  .type-card span {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .topic-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 16px;
    padding: 20px;
  }

  .topic-card__icon {
    grid-row: 1 / span 3;
  }

  .topic-card h3 {
    margin: 0 0 6px;
  }

  .topic-card small {
    grid-column: 2;
    padding-top: 11px;
  }

  .featured-layout__media {
    min-height: 260px;
  }

  .featured-layout__play {
    left: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
  }

  .featured-layout__body {
    padding: 28px 24px 32px;
  }

  .featured-layout h3 {
    font-size: 2rem;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .search-field {
    grid-column: auto;
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .resource-card__body {
    padding: 20px;
  }

  .site-footer {
    padding-top: 54px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-bottom: 38px;
  }

  .site-footer__brand {
    grid-column: auto;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 8px;
  }

  .resource-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .resource-dialog__shell {
    max-height: calc(100dvh - 16px);
  }

  .resource-dialog header,
  .resource-dialog footer {
    padding: 15px 16px;
  }

  .resource-dialog__viewer video,
  .resource-dialog__viewer iframe {
    height: 54vh;
  }

  .resource-dialog__content {
    overflow-y: auto;
    flex-direction: column;
  }

  .resource-dialog__viewer {
    flex: 0 0 auto;
  }

  .resource-dialog__files {
    width: 100%;
    max-height: 230px;
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .document-viewer {
    min-height: 54vh;
    padding: 34px 18px;
  }

  .resource-dialog footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-dialog__footer-actions,
  .resource-dialog__footer-actions > * {
    width: 100%;
  }

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

  .share-dialog {
    width: calc(100% - 16px);
    border-radius: 16px;
  }

  .share-dialog__shell > header,
  .share-dialog__body,
  .share-dialog__shell > footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .admin-login-dialog {
    width: calc(100% - 16px);
    border-radius: 16px;
  }

  .admin-login-dialog__shell > header,
  .admin-login-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .share-url-field__control {
    grid-template-columns: 1fr;
  }

  .share-url-field button {
    min-height: 44px;
  }

  .share-dialog__shell > footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .quiz-dialog {
    width: calc(100% - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .quiz-dialog__shell {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .quiz-dialog header,
  .quiz-dialog__body,
  .quiz-form > footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .quiz-progress {
    grid-template-columns: 1fr;
  }

  .quiz-progress > span {
    grid-row: auto;
    justify-self: start;
  }

  .quiz-form > footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .quiz-form > footer .button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .learning-overview__header { align-items: stretch; flex-direction: column; }
  .learning-overview__body { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-button { min-height: 38px; padding-inline: 14px; }
  .account-avatar { width: 40px; height: 40px; }
  .account-menu { position: fixed; top: 76px; right: 16px; }
  .learning-overview { padding-block: 42px; }
  .history-filter { display: grid; grid-template-columns: 1fr 1fr; }
  .history-filter label,
  .history-filter input { min-width: 0; }
  .history-filter button { grid-column: 1 / -1; }
  .learning-summary__card { min-height: 205px; padding: 22px 16px 17px; }
  .learning-summary__card strong { font-size: 2.35rem; }
  .learning-history__heading { align-items: flex-start; flex-direction: column; }
  .youtube-player { min-height: 260px; }

  .resource-dialog header > div,
  .admin-login-dialog__shell > header > div { min-width: 0; }

  .resource-dialog h2,
  .admin-login-dialog__shell > header h2 { overflow-wrap: anywhere; }

  .featured-layout__actions > * {
    min-width: 0;
    flex: 1 1 calc(50% - 5px);
  }

  .featured-layout__actions > :first-child { flex-basis: 100%; }
}

@media (max-width: 360px) {
  .container,
  .site-header__inner { width: calc(100% - 24px); }

  .site-header__inner { gap: 8px; }

  .brand { gap: 0; }

  .brand img {
    width: 120px;
    height: 60px;
  }

  .brand__divider,
  .brand__academy { display: none; }

  .header-actions {
    gap: 6px;
    margin-left: auto;
  }

  .login-button { padding-inline: 13px; }

  .account-avatar,
  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .account-menu {
    right: 12px;
    width: min(250px, calc(100% - 24px));
  }

  .academy-hero__actions,
  .history-filter,
  .learning-summary { grid-template-columns: 1fr; }

  .learning-summary__card {
    min-height: 176px;
    padding: 23px 20px 18px;
  }

  .hero-stats div { padding-inline: 8px; }

  .resource-dialog header,
  .quiz-dialog header { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
