:root {
  --gold: #B89656;
  --gold-soft: #E8DDC8;
  --cobalt: #1E4C8B;
  --cobalt-deep: #173761;
  --ember: #C75A1F;
  --graphite: #2C2C32;
  --ink: #202633;
  --canvas: #F4F7FA;
  --canvas-warm: #F8F5EF;
  --surface: #FFFFFF;
  --surface-soft: #EEF3F8;
  --line: rgba(32, 38, 51, 0.12);
  --line-gold: rgba(184, 150, 86, 0.34);
  --text: #202633;
  --text-heading: #1C2430;
  --muted: #667085;
  --shadow: 0 18px 48px rgba(30, 76, 139, 0.11);
  --shadow-soft: 0 10px 28px rgba(32, 38, 51, 0.08);
  --max: 1440px;
  --logo-orange-light: #ff8a1c;
  --logo-orange-dark: #d95f12;
  --login-wallpaper: url("assets/wallpaper_flowcore_claro.png");
  --inside-wallpaper: url("assets/wallpaper_flowcore_into.png");
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Calibri Light", Calibri, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(244, 247, 250, 0.82), rgba(255, 255, 255, 0.66)),
    radial-gradient(circle at 12% 0%, rgba(30, 76, 139, 0.12), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(184, 150, 86, 0.16), transparent 28%),
    var(--inside-wallpaper) center top / cover fixed no-repeat,
    linear-gradient(135deg, var(--canvas) 0%, #FFFFFF 48%, var(--canvas-warm) 100%);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(30, 76, 139, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(184, 150, 86, 0.055) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 72%);
}

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

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 18px;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid var(--line);
  box-shadow: 10px 0 34px rgba(32, 38, 51, 0.06);
  backdrop-filter: blur(18px);
}

.sidebar.is-hidden {
  display: none;
}

.sidebar.is-hidden + .main-stage {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  padding: 0;
}

.brand {
  display: block;
  padding: 6px 4px 24px;
  border-bottom: 1px solid var(--gold-soft);
}

.brand img {
  width: 190px;
  max-width: 100%;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(30, 76, 139, 0.1));
}

.nav-stack {
  display: grid;
  gap: 8px;
}

.nav-stack a,
.ghost-button,
.secondary-button,
.primary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nav-stack a {
  justify-content: flex-start;
  padding: 0 14px;
  color: #5F6673;
  border: 1px solid transparent;
}

.nav-stack a:hover,
.nav-stack a.is-active {
  color: var(--cobalt-deep);
  border-color: var(--line-gold);
  background: linear-gradient(135deg, rgba(184, 150, 86, 0.12), rgba(30, 76, 139, 0.05));
  box-shadow: 0 10px 24px rgba(184, 150, 86, 0.1);
}

.main-stage {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 34px 22px 58px;
}

.main-stage:focus,
.main-stage:focus-visible {
  outline: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: end;
  padding: 24px clamp(24px, 7vw, 118px) 24px 24px;
  background:
    linear-gradient(90deg, rgba(244, 247, 250, 0.02), rgba(255, 255, 255, 0.12) 44%, rgba(255, 255, 255, 0.22) 100%),
    var(--login-wallpaper) center top / cover no-repeat,
    #F4F7FA;
}

.login-screen::before {
  content: "";
  position: fixed;
  inset: 24px;
  pointer-events: none;
  border: 1px solid rgba(184, 150, 86, 0.26);
  border-radius: 8px;
}

.login-panel {
  position: relative;
  width: min(100%, 454px);
  padding: 38px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
}

.login-logo {
  width: 102px;
  max-width: 100%;
  display: block;
  margin: 4px auto 0;
  filter: grayscale(1);
  opacity: 0.58;
}

.login-logo-small {
  justify-self: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.login-panel .eyebrow {
  color: var(--logo-orange-light);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--graphite);
}

h1 {
  font-size: clamp(2.1rem, 6vw, 4.2rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  font-size: 1.06rem;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.muted {
  margin-top: 12px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin: 28px 0 16px;
}

.otp-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.otp-fieldset legend {
  margin-bottom: 8px;
  color: var(--ink);
}

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp-box {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  min-height: 48px;
  padding: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cobalt-deep);
}

.login-status {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #166534;
  font-size: 14px;
  line-height: 1.45;
}

.login-status.is-error {
  background: #fef2f2;
  color: #991b1b;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
}

input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid rgba(32, 38, 51, 0.16);
  border-radius: 8px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 86, 0.18);
}

.login-panel input:focus {
  border-color: var(--logo-orange-light);
  box-shadow: 0 0 0 3px rgba(255, 138, 28, 0.18);
}

.primary-button {
  border: 1px solid rgba(30, 76, 139, 0.18);
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-deep));
  padding: 0 18px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(30, 76, 139, 0.18);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  box-shadow: 0 16px 32px rgba(30, 76, 139, 0.24);
}

.secondary-button {
  border: 1px solid rgba(184, 150, 86, 0.44);
  color: var(--cobalt-deep);
  background: #FFFFFF;
  padding: 0 14px;
  box-shadow: 0 6px 18px rgba(32, 38, 51, 0.06);
}

.ghost-button {
  margin-top: auto;
  border: 1px solid rgba(32, 38, 51, 0.14);
  color: #5F6673;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}

.ghost-button.inline {
  margin-top: 0;
  padding: 0 14px;
}

.text-link {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-header {
  display: grid;
  gap: 12px;
  margin: 18px 0 30px;
  padding: 28px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(238, 243, 248, 0.82)),
    #FFFFFF;
  box-shadow: var(--shadow-soft);
}

.page-header p {
  max-width: 720px;
}

.academy-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 22px;
  align-items: stretch;
  margin: 18px 0 18px;
  padding: 30px;
  border: 1px solid rgba(30, 76, 139, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(238,243,248,.9)),
    radial-gradient(circle at 10% 0%, rgba(30, 76, 139, 0.12), transparent 32%),
    #FFFFFF;
  box-shadow: var(--shadow);
}

.academy-cockpit > div:first-child {
  display: grid;
  align-content: center;
  gap: 14px;
}

.academy-cockpit h1 {
  max-width: 760px;
  color: #1C2430;
  font-family: "Bahnschrift", "DIN Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  font-size: clamp(2.15rem, 4.1vw, 4.05rem);
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.academy-cockpit p {
  max-width: 760px;
}

.student-identity {
  position: relative;
  display: grid;
  gap: 8px;
  max-width: 780px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(30, 76, 139, 0.16);
  border-left: 5px solid rgba(31, 63, 104, 0.16);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.99), rgba(248,249,250,.96));
  box-shadow:
    0 22px 48px rgba(18, 44, 77, 0.20),
    0 7px 16px rgba(18, 44, 77, 0.12),
    inset 0 1px 0 rgba(255,255,255,.92);
  transform: translateY(-2px);
}

.student-identity::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}

.student-identity span {
  position: relative;
  z-index: 1;
  color: #7B6137;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.student-identity strong {
  position: relative;
  z-index: 1;
  color: var(--cobalt-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.4vw, 3.3rem);
  font-weight: 400;
  line-height: 1;
}

.student-identity p {
  position: relative;
  z-index: 1;
  margin: 0;
}

.cockpit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cockpit-status-panel {
  position: relative;
  display: grid;
  align-content: stretch;
  gap: 14px;
  min-height: 220px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(76, 174, 232, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(circle at 82% 4%, rgba(76, 174, 232, 0.26), transparent 34%),
    radial-gradient(circle at 12% 90%, rgba(255, 138, 28, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(31, 63, 104, 0.96), rgba(15, 40, 72, 0.98)),
    #173761;
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 20px 46px rgba(18, 44, 77, 0.20);
}

.cockpit-status-panel::before,
.cockpit-status-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cockpit-status-panel::before {
  inset: 12px;
  border-top: 1px solid rgba(255, 138, 28, 0.62);
  border-right: 1px solid rgba(255, 138, 28, 0.34);
  opacity: .78;
}

.cockpit-status-panel::after {
  width: 72px;
  height: 72px;
  right: -18px;
  bottom: -18px;
  border: 1px solid rgba(76, 174, 232, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(76, 174, 232, 0.06);
}

.cockpit-status-panel span,
.cockpit-metrics span,
.premium-heading > span {
  color: #7B6137;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cockpit-status-panel span {
  color: rgba(255,255,255,.66);
}

.cockpit-status-panel strong {
  position: relative;
  z-index: 1;
  max-width: 280px;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(1.32rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.1;
  text-transform: uppercase;
}

.cockpit-status-panel p {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.74);
}

.ihm-panel-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.ihm-panel-top b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8AF6C8;
  font-family: "Courier New", Courier, monospace;
  font-size: .78rem;
  letter-spacing: .08em;
  animation: ihmHeartbeatText 1.8s ease-in-out infinite;
}

.ihm-panel-top b::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: ihmHeartbeatDot 1.8s ease-in-out infinite;
}

@keyframes ihmHeartbeatDot {
  0%, 28%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px currentColor;
    opacity: .82;
  }
  12% {
    transform: scale(1.45);
    box-shadow: 0 0 18px currentColor, 0 0 28px rgba(138, 246, 200, 0.38);
    opacity: 1;
  }
  20% {
    transform: scale(1.12);
    box-shadow: 0 0 14px currentColor;
    opacity: .94;
  }
}

@keyframes ihmHeartbeatText {
  0%, 28%, 100% {
    text-shadow: 0 0 0 rgba(138, 246, 200, 0);
  }
  12% {
    text-shadow: 0 0 12px rgba(138, 246, 200, 0.72);
  }
}

.ihm-status-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ihm-status-grid div {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(76, 174, 232, 0.24);
  border-radius: 6px;
  background: rgba(3, 13, 28, 0.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.ihm-status-grid b {
  color: #FFFFFF;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.45rem;
  line-height: 1;
}

.ihm-signal {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.ihm-signal::after {
  content: "";
  display: block;
  height: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(2, 12, 26, 0.42);
}

.ihm-signal i {
  position: absolute;
  left: 0;
  bottom: 1px;
  display: block;
  min-width: 8px;
  max-width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4CAEE8, #FF8A1C);
  box-shadow: 0 0 14px rgba(76, 174, 232, 0.42);
}

.cockpit-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.cockpit-metrics article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-soft);
}

.cockpit-metrics strong {
  color: var(--cobalt-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.premium-heading {
  margin: 24px 0 16px;
}

.course-materials {
  margin-top: 24px;
}

.compact-heading {
  margin-bottom: 12px;
}

.institutional-video {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.institutional-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.institutional-video-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.institutional-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #071121;
}

.institutional-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 17, 33, 0.72);
  backdrop-filter: blur(6px);
}

.video-modal {
  width: min(920px, 100%);
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(224, 213, 190, 0.72);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 28px 70px rgba(7, 17, 33, 0.28);
}

.video-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.video-modal-header h2 {
  margin: 8px 0 0;
  font-size: 1.35rem;
}

.video-modal-close {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.video-modal-close:hover,
.video-modal-close:focus-visible {
  border-color: var(--gold);
  color: #7A5A15;
}

.course-video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #071121;
}

.course-video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.course-grid,
.catalog-grid,
.library-grid,
.finance-course-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.commerce-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  gap: 22px;
  align-items: start;
}

.membership-section {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid rgba(184, 150, 86, 0.3);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 243, 248, 0.9));
  box-shadow: var(--shadow-soft);
}

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

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  color: var(--text-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 400;
}

.section-heading > p {
  max-width: 560px;
  margin: 0;
}

.membership-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.membership-plan-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.membership-plan-card.is-featured {
  border-color: rgba(184, 150, 86, 0.68);
  box-shadow: 0 18px 44px rgba(123, 97, 55, 0.13);
}

.membership-plan-card h3 {
  margin: 0;
  color: var(--cobalt-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
}

.membership-plan-card > p {
  margin: 0;
}

.membership-plan-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.membership-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.membership-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.membership-price strong,
.selected-membership-summary strong {
  color: var(--cobalt-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
}

.membership-price span,
.selected-membership-summary span {
  color: var(--muted);
  font-weight: 700;
}

.membership-active {
  padding: 11px 12px;
  border: 1px solid rgba(32, 128, 92, 0.26);
  border-radius: 8px;
  background: rgba(32, 128, 92, 0.08);
  color: #176b4c;
  font-weight: 700;
}

.selected-membership-summary {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid rgba(184, 150, 86, 0.28);
  border-radius: 8px;
  background: rgba(184, 150, 86, 0.07);
}

.checkout-panel {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.checkout-panel h2 {
  margin: 0;
  color: var(--text-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 400;
}

.cart-items,
.checkout-form {
  display: grid;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(184, 150, 86, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.cart-item div {
  display: grid;
  gap: 5px;
}

.cart-item strong,
.cart-item b {
  color: var(--cobalt-deep);
}

.cart-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checkout-total span {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.checkout-total strong {
  color: var(--cobalt-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 400;
}

.checkout-form label {
  display: grid;
  gap: 7px;
  color: var(--text-heading);
  font-size: 0.9rem;
  font-weight: 700;
}

.checkout-form input {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.checkout-status {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(30, 76, 139, 0.18);
  border-radius: 8px;
  background: rgba(30, 76, 139, 0.06);
  color: var(--cobalt-deep);
  font-weight: 700;
}

.checkout-status.is-error {
  border-color: rgba(199, 90, 31, 0.28);
  background: rgba(199, 90, 31, 0.08);
  color: var(--ember);
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.course-card,
.catalog-card,
.library-card,
.finance-course-card,
.money-card,
.info-panel,
.material-item,
.empty-state,
.video-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.course-card,
.catalog-card,
.library-card,
.finance-course-card {
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.course-card:hover,
.catalog-card:hover,
.library-card:hover,
.finance-course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.course-card img,
.catalog-card img,
.finance-course-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.course-card-body,
.catalog-card-body,
.finance-course-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.finance-course-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.finance-course-body > div:first-child {
  display: grid;
  gap: 12px;
}

.finance-facts {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 12px;
}

.finance-facts div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(184, 150, 86, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.finance-facts span,
.manual-note {
  color: #7B6137;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.finance-facts strong {
  color: var(--cobalt-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.2;
}

.library-hero {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 22px;
  align-items: center;
  margin: 18px 0 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.library-hero div {
  display: grid;
  gap: 12px;
}

.library-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(32, 38, 51, 0.12);
}

.library-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 243, 248, 0.82)),
    #FFFFFF;
}

.library-card > div:first-child {
  display: grid;
  gap: 10px;
}

.library-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(32, 38, 51, 0.1);
}

.library-card-footer span {
  color: #7B6137;
  font-weight: 700;
}

.specialist-shell {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.specialist-panel,
.specialist-chat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(31, 63, 104, 0.06);
  padding: 20px;
}

.specialist-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.specialist-panel h2 {
  margin: 8px 0 4px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.specialist-panel p {
  margin: 0;
  font-size: 0.94rem;
}

.specialist-panel .type-chip {
  width: fit-content;
  font-size: 0.68rem;
  padding: 5px 8px;
  line-height: 1;
}

.specialist-suggestions {
  display: grid;
  gap: 8px;
}

.specialist-suggestions button {
  min-height: 38px;
  border: 1px solid rgba(184, 150, 86, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--cobalt-deep);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
}

.specialist-suggestions button:hover {
  border-color: rgba(184, 150, 86, 0.58);
  background: #fff;
}

.specialist-chat {
  display: grid;
  gap: 16px;
}

.specialist-message,
.specialist-answer {
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
}

.specialist-message strong,
.specialist-answer strong {
  display: block;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.specialist-answer span {
  font-weight: 700;
  color: var(--text-heading);
}

.specialist-answer.is-error {
  background: #fef2f2;
  color: #991b1b;
}

.specialist-form button:disabled {
  opacity: .62;
  cursor: wait;
}

.specialist-form {
  display: grid;
  gap: 12px;
}

.specialist-form textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid rgba(32, 38, 51, 0.16);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  outline: none;
}

.specialist-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 86, 0.18);
}

.tools-shell {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tools-menu,
.tool-workspace,
.certificate-draft {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(31, 63, 104, 0.06);
}

.tools-menu {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.tools-menu a {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(32, 38, 51, 0.12);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tools-menu a:hover,
.tools-menu a.is-active {
  border-color: rgba(184, 150, 86, 0.44);
  background: linear-gradient(135deg, rgba(184, 150, 86, 0.12), rgba(30, 76, 139, 0.04));
  box-shadow: 0 14px 28px rgba(184, 150, 86, 0.12);
  transform: translateY(-1px);
}

.tools-menu strong {
  color: var(--text-heading);
}

.tools-menu small {
  color: var(--muted);
}

.tool-workspace {
  display: grid;
  gap: 20px;
  padding: 20px;
}

.tool-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tool-header h2,
.certificate-draft h2 {
  margin: 4px 0 8px;
  color: var(--text-heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 400;
  line-height: 1.08;
}

.tool-header p,
.certificate-draft p {
  margin: 0;
  max-width: 760px;
}

.calculation-form {
  display: grid;
  gap: 16px;
}

.solve-for-panel,
.intelligent-calculator-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(32, 38, 51, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  box-shadow: 0 14px 32px rgba(31, 63, 104, 0.05);
}

.solve-for-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 18px;
  align-items: end;
}

.solve-for-header h2,
.intelligent-calculator-panel h2 {
  margin: 4px 0 8px;
  color: var(--text-heading);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.12;
}

.solve-for-header p,
.intelligent-calculator-panel p {
  margin: 0;
}

.solve-target,
.solve-form label {
  display: grid;
  gap: 7px;
  color: var(--text-heading);
  font-size: 0.9rem;
  font-weight: 800;
}

.solve-target select,
.solve-form input,
.solve-form select {
  min-height: 42px;
  border: 1px solid rgba(32, 38, 51, 0.16);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: #FFFFFF;
  outline: none;
}

.solve-target select:focus,
.solve-form input:focus,
.solve-form select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 86, 0.18);
}

.solve-form {
  display: grid;
  gap: 14px;
}

.solve-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.solve-form label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.field-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto);
  gap: 8px;
}

.solve-checkbox {
  align-content: end;
  grid-template-columns: auto 1fr;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(32, 38, 51, 0.12);
  border-radius: 8px;
  background: #FFFFFF;
}

.solve-checkbox input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--cobalt);
}

.solve-checkbox span {
  color: var(--text-heading);
  font-weight: 800;
}

.solve-formula {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px dashed rgba(184, 150, 86, 0.42);
  border-radius: 8px;
  background: rgba(248, 245, 239, 0.62);
}

.solve-formula strong {
  color: #7B6137;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.solve-formula code {
  color: var(--text-heading);
  overflow-wrap: anywhere;
  white-space: normal;
}

.solve-result:empty {
  display: none;
}

.calculation-form fieldset {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(32, 38, 51, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244, 247, 250, 0.8), rgba(255, 255, 255, 0.94));
}

.calculation-form legend {
  padding: 0 8px;
  color: #7B6137;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calculation-form label {
  display: grid;
  gap: 6px;
  color: var(--text-heading);
  font-size: 0.88rem;
  font-weight: 700;
}

.calculation-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(32, 38, 51, 0.16);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: #FFFFFF;
  outline: none;
}

.calculation-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 86, 0.18);
}

.calculation-form small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calculation-output {
  display: grid;
  gap: 14px;
}

.calculation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-heading);
}

.calculation-summary span {
  color: #7B6137;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

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

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

.result-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(32, 38, 51, 0.12);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 14px 32px rgba(31, 63, 104, 0.06);
}

.result-card.is-error {
  border-color: rgba(153, 27, 27, 0.22);
  background: #FEF2F2;
  color: #991B1B;
}

.result-card-header {
  display: grid;
  gap: 8px;
}

.result-card h3 {
  margin: 0;
  color: var(--text-heading);
  font-size: 1.2rem;
}

.result-card p {
  margin: 0;
}

.result-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.result-inputs div {
  padding: 8px;
  border-radius: 8px;
  background: #F8FAFC;
}

.result-inputs dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.result-inputs dd {
  margin: 2px 0 0;
  color: var(--text-heading);
  font-weight: 800;
}

.formula-block {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px dashed rgba(184, 150, 86, 0.42);
  border-radius: 8px;
  background: rgba(248, 245, 239, 0.6);
}

.formula-block strong {
  color: #7B6137;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.formula-block code {
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--text-heading);
}

.result-value {
  color: var(--cobalt-deep);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
}

.result-value span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.certificate-draft {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.certificate-draft ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.certificate-draft li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #F8FAFC;
}

.certificate-draft li strong {
  color: var(--text-heading);
}

.certificate-draft li span {
  color: #7B6137;
  font-weight: 800;
}

.money-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-top: 4px solid var(--gold);
}

.money-card span,
.price-row span {
  color: #7B6137;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.money-card strong,
.price-row strong,
.billing-actions strong {
  color: var(--cobalt-deep);
  font-size: 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.section-heading,
.billing-row,
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.billing-panel {
  display: grid;
  gap: 16px;
}

.billing-list {
  display: grid;
  gap: 12px;
}

.billing-row {
  padding: 16px 0;
  border-top: 1px solid rgba(32, 38, 51, 0.1);
}

.billing-row > div:first-child,
.billing-actions {
  display: grid;
  gap: 8px;
}

.billing-actions {
  justify-items: end;
}

.status-pill,
.type-chip {
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(184, 150, 86, 0.38);
  border-radius: 8px;
  color: #7B6137;
  background: rgba(184, 150, 86, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.progress-row strong {
  color: var(--cobalt-deep);
}

.progress-bar {
  height: 7px;
  overflow: hidden;
  background: #E5EAF0;
  border-radius: 8px;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--ember));
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
  align-items: end;
  margin: 18px 0 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.course-hero h1 {
  max-width: 980px;
  font-size: clamp(2.4rem, 4.2vw, 4rem);
}

.course-hero div {
  display: grid;
  gap: 12px;
}

.course-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(32, 38, 51, 0.12);
}

.video-shell {
  padding: 14px;
  margin-bottom: 22px;
}

.video-shell.is-hidden {
  display: none;
}

.video-station {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 22vw, 320px);
  gap: 14px;
  align-items: start;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid rgba(30, 76, 139, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.video-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.video-main-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #071121;
  box-shadow: 0 18px 44px rgba(7, 17, 33, 0.2);
}

.video-main-frame iframe,
.video-main-frame .video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-main-copy {
  display: grid;
  gap: 8px;
  padding: 0 2px;
}

.video-main-copy h2 {
  max-width: 980px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.12;
}

.video-playlist {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.video-playlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px 0;
}

.video-playlist-head span {
  color: #7B6137;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.video-playlist-head strong {
  color: var(--cobalt-deep);
  font-size: .9rem;
}

.video-playlist-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.video-thumb {
  width: 100%;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
  cursor: pointer;
}

.video-thumb:hover,
.video-thumb.is-active {
  border-color: rgba(30, 76, 139, 0.34);
  background: #F7FAFD;
}

.video-thumb-image {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #071121;
}

.video-thumb-image img {
  width: 100%;
  height: 100%;
  min-height: 62px;
  display: block;
  object-fit: cover;
  opacity: .82;
}

.video-thumb-image b {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(7, 17, 33, 0.82);
  color: #FFFFFF;
  font-size: .72rem;
}

.video-thumb-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.video-thumb-copy strong {
  overflow: hidden;
  color: var(--graphite);
  font-size: .92rem;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.video-thumb-copy small,
.video-thumb-copy em {
  color: var(--muted);
  font-size: .78rem;
  font-style: normal;
}

.video-thumb-copy em {
  color: #7B6137;
  font-weight: 800;
}

.course-player-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.course-player-heading h2 {
  margin: 0;
  font-size: 1.2rem;
}

.course-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(184, 150, 86, 0.24);
  border-radius: 8px;
  background: #071121;
  box-shadow: var(--shadow-soft);
}

.course-player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(184, 150, 86, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(30, 76, 139, 0.1), rgba(184, 150, 86, 0.12)),
    #F7F9FB;
  text-align: center;
}

.video-placeholder span {
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
}

.video-placeholder strong {
  color: var(--graphite);
}

.video-placeholder small {
  color: var(--muted);
}

.materials-stack,
.material-list,
.profile-grid,
.certificate-list {
  display: grid;
  gap: 14px;
}

.material-group {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.material-group h2 {
  padding-left: 12px;
  border-left: 3px solid var(--gold);
}

.material-item {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.material-item.is-completed {
  border-color: rgba(26, 122, 58, 0.28);
  background: linear-gradient(135deg, rgba(26, 122, 58, 0.07), rgba(255, 255, 255, 0.96));
}

.material-item > div:first-child {
  display: grid;
  gap: 7px;
}

.material-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.button-pair {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.completion-check {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.completion-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}

.completion-check.is-checked {
  border-color: rgba(26, 122, 58, 0.45);
  background: #e3f7e8;
  color: #1a7a3a;
}

.is-disabled {
  pointer-events: none;
  opacity: 0.48;
}

.profile-grid {
  grid-template-columns: 0.8fr 1.2fr;
}

.info-panel {
  padding: 22px;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.credit-card,
.level-panel,
.level-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(31, 63, 104, 0.06);
}

.credit-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  min-height: 150px;
}

.credit-card span {
  color: #7B6137;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.credit-card strong {
  color: var(--cobalt-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1;
}

.credit-card p {
  margin: 0;
}

.credit-card.highlight {
  border-color: rgba(184, 150, 86, 0.38);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.92), rgba(255, 255, 255, 0.9));
}

.level-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.level-panel h2 {
  margin: 0;
}

.level-panel p {
  margin: 0;
}

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

.level-step {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #f8fafc;
}

.level-step strong {
  color: var(--text-heading);
}

.level-step span {
  color: var(--muted);
}

.level-step.is-active {
  border-color: rgba(184, 150, 86, 0.55);
  background: #fff7ed;
}

dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

dt {
  color: #7B6137;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  color: var(--text);
}

.certificate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(32, 38, 51, 0.1);
}

.certificate-row div {
  display: grid;
  gap: 4px;
}

.certificate-row span {
  color: var(--muted);
}

.empty-state {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 30px;
  text-align: center;
}

.empty-state p {
  max-width: 560px;
}

.empty-state.compact {
  min-height: 240px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
  }

  .brand {
    width: 150px;
    padding: 0;
    border-bottom: 0;
    flex: 0 0 auto;
  }

  .nav-stack {
    display: flex;
    flex: 1 0 auto;
  }

  .ghost-button {
    margin-top: 0;
    flex: 0 0 auto;
  }

  .main-stage {
    padding: 24px 16px 42px;
  }

  .course-grid,
  .catalog-grid,
  .membership-plan-grid,
  .library-grid,
  .finance-course-grid,
  .summary-grid,
  .commerce-shell,
  .academy-cockpit,
  .cockpit-metrics,
  .course-hero,
  .video-station,
  .library-hero,
  .profile-grid,
  .tools-shell,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .checkout-panel {
    position: static;
  }

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

  .calculation-form fieldset {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .solve-for-header,
  .solve-fields {
    grid-template-columns: 1fr;
  }

  .cockpit-status-panel {
    min-height: auto;
  }

  .academy-cockpit h1 {
    white-space: normal;
  }

  .video-playlist-list {
    max-height: none;
  }

  .specialist-shell {
    grid-template-columns: 1fr;
  }

  .credits-grid,
  .level-steps {
    grid-template-columns: 1fr;
  }

  .video-modal-backdrop {
    padding: 14px;
  }

  .video-modal {
    padding: 14px;
  }

  .video-modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .video-modal-close {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .login-panel {
    padding: 24px;
  }

  .login-screen {
    justify-items: center;
    padding: 24px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.26)),
      var(--login-wallpaper) center top / cover no-repeat,
      #F4F7FA;
  }

  .login-screen::before {
    inset: 12px;
  }

  .sidebar {
    padding: 14px;
  }

  .brand {
    width: 124px;
  }

  .nav-stack a {
    min-width: 118px;
  }

  .material-item,
  .video-thumb,
  .certificate-row,
  .billing-row,
  .library-card-footer,
  .section-heading,
  .price-row,
  .tool-header,
  .certificate-draft li {
    align-items: stretch;
    flex-direction: column;
  }

  .calculation-form fieldset,
  .result-inputs,
  .field-with-unit {
    grid-template-columns: 1fr;
  }

  .billing-actions {
    justify-items: stretch;
  }

  .secondary-button,
  .primary-button,
  .ghost-button.inline,
  .completion-check {
    width: 100%;
  }

  .material-actions {
    justify-content: stretch;
  }

  .video-thumb {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .finance-facts {
    grid-template-columns: 1fr;
  }

  .cart-item,
  .checkout-total {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .checkout-total {
    display: grid;
  }
}
