@font-face {
  font-family: 'Futura Lt BT';
  src: url('/fonts/futura-lt-w01-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #13241e;
  --muted: #6f7c77;
  --cream: #f4f0e7;
  --paper: #fffdf8;
  --lime: #d7ef74;
  --green: #245b47;
  --line: #dcded5;
  --coral: #e88d72;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
}

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

.topbar {
  height: 72px;
  padding: 0 clamp(24px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #10211b;
  color: white;
}

.brand, .learner { display: flex; align-items: center; gap: 12px; }
.portal-nav { display: flex; align-items: center; gap: 24px; }
.portal-nav > a { color: #c5d0ca; text-decoration: none; font-size: 12px; font-weight: 600; }
.portal-nav > a:hover { color: var(--lime); }
.brand { color: white; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark, .avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}
.brand-mark { width: 34px; height: 34px; color: var(--ink); background: var(--lime); font-family: "Newsreader", serif; font-size: 21px; }
.avatar { width: 34px; height: 34px; background: #315247; font-size: 11px; }
.learner { color: #d7dfda; font-size: 13px; }

main { min-height: calc(100vh - 72px); }
.hero {
  min-height: 330px;
  padding: 62px clamp(24px, 7vw, 104px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  color: white;
  background: #17372c;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border: 1px solid rgba(215,239,116,.18);
  border-radius: 50%;
  right: 24%; top: -260px;
  box-shadow: 0 0 0 70px rgba(215,239,116,.025), 0 0 0 140px rgba(215,239,116,.025);
}
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; color: #8fa197; }
.hero .eyebrow { color: var(--lime); }
h1, h2 { font-family: "Newsreader", Georgia, serif; letter-spacing: -.035em; margin: 8px 0 0; }
h1 { font-size: clamp(48px, 6vw, 76px); line-height: .93; font-weight: 600; }
.hero p { color: #b9c8c1; margin: 22px 0 0; max-width: 430px; line-height: 1.6; }

.upload-button {
  position: relative;
  z-index: 1;
  min-width: 250px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  border-radius: 2px;
  color: var(--ink);
  background: var(--lime);
  text-align: left;
  cursor: pointer;
  box-shadow: 8px 8px 0 rgba(0,0,0,.18);
  transition: transform .2s, box-shadow .2s;
}
.upload-button:hover { transform: translate(-2px,-2px); box-shadow: 11px 11px 0 rgba(0,0,0,.18); }
.upload-button .plus { font-size: 34px; line-height: 1; font-weight: 300; }
.upload-button b, .upload-button small { display: block; }
.upload-button small { margin-top: 3px; color: #526057; font-size: 11px; }

.update-banner { background: linear-gradient(135deg, #1a1500 0%, #2a2000 100%); border-top: 1px solid #4a3a00; border-bottom: 1px solid #4a3a00; }
.update-banner h3 { font-size: 22px; font-weight: 400; margin: 6px 0 6px; color: #f5f5f3; }
.update-banner p { color: #9e9a98; font-size: 14px; }
.admin-status.needs-update { background: #422d0010; color: #d97706; }
.renewal-banner { background: linear-gradient(135deg, #1a0000 0%, #2a0a00 100%); border-top: 1px solid #5a1a00; border-bottom: 1px solid #5a1a00; }
.renewal-banner h3 { font-size: 22px; font-weight: 400; margin: 6px 0 6px; color: #f5f5f3; }
.renewal-banner p { color: #9e9a98; font-size: 14px; }
.certificate-banner { background: linear-gradient(135deg, #1a0f00 0%, #2a1500 100%); border-top: 1px solid #3a2000; border-bottom: 1px solid #3a2000; }
.certificate-banner-inner { max-width: 1500px; margin: auto; padding: 36px clamp(24px, 7vw, 104px); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.certificate-banner h3 { font-size: 22px; font-weight: 400; margin: 6px 0 6px; color: #f5f5f3; }
.certificate-banner p { color: #9e9a98; font-size: 14px; }
.cert-download-btn { flex-shrink: 0; display: inline-block; background: #ff5b17; color: #fff; text-decoration: none; padding: 14px 28px; border-radius: 100px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.cert-download-btn:hover { background: #e04d10; }
.library { padding: 58px clamp(24px, 7vw, 104px) 90px; max-width: 1500px; margin: auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
h2 { font-size: 38px; }
.course-count { color: var(--muted); font-size: 13px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 24px; }
.course-card { background: var(--paper); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 14px 35px rgba(16,33,27,.08); }
.cover { height: 160px; padding: 18px; position: relative; overflow: hidden; background: #cfdfd6; }
.course-card:nth-child(3n+2) .cover { background: #e8c9bc; }
.course-card:nth-child(3n+3) .cover { background: #dfe4a9; }
.cover-art { position: absolute; inset: 0; transform: rotate(-8deg) scale(1.1); }
.cover-art i { position: absolute; display: block; border-radius: 50%; border: 16px solid rgba(255,255,255,.42); }
.cover-art i:nth-child(1) { width: 150px; height: 150px; right: -25px; bottom: -65px; }
.cover-art i:nth-child(2) { width: 80px; height: 80px; left: 70px; top: 32px; border-width: 10px; }
.cover-art i:nth-child(3) { width: 36px; height: 36px; left: 25px; bottom: -8px; border-width: 7px; }
.card-body { padding: 22px; }
.status-row { min-height: 18px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; margin-right: 7px; display: inline-block; border-radius: 50%; background: #a7afa9; }
.status.complete::before, .status.passed::before { background: #4c9975; }
.status.incomplete::before, .status.browsed::before { background: #e4a444; }
.title { min-height: 54px; margin: 10px 0 18px; font-size: 18px; line-height: 1.45; letter-spacing: -.015em; }
.progress-track { height: 3px; background: #e4e5df; margin-bottom: 20px; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--green); }
.card-actions { display: flex; gap: 8px; }
.launch-button { flex: 1; display: flex; justify-content: space-between; padding: 12px 14px; color: white; background: var(--green); text-decoration: none; font-size: 12px; font-weight: 600; }
.delete-button { width: 42px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.delete-button:hover { color: #a14330; border-color: #d8aaa0; }

.empty-state { padding: 70px 20px; border: 1px dashed #c5c9c0; text-align: center; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: #e3e8d0; font-size: 24px; }
.empty-state h3 { margin: 18px 0 7px; font-family: "Newsreader", serif; font-size: 27px; }
.empty-state p { color: var(--muted); font-size: 13px; }
.text-button { border: 0; border-bottom: 1px solid var(--green); color: var(--green); background: transparent; padding: 5px 0; cursor: pointer; font-weight: 600; }
.notice { padding: 14px 18px; margin-bottom: 22px; border-left: 3px solid var(--coral); background: #f8e4dc; font-size: 13px; }
.upload-overlay { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; background: rgba(16,33,27,.93); color: white; }
.upload-overlay[hidden] { display: none; }
.upload-overlay span { color: #afc0b8; font-size: 13px; }
.spinner { width: 42px; height: 42px; margin-bottom: 10px; border: 3px solid #476257; border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.player-body { height: 100vh; overflow: hidden; background: #0c1713; }
.player-shell { height: 100%; display: grid; grid-template-rows: 62px 1fr; }
.player-bar { display: flex; align-items: center; gap: 18px; padding: 0 22px; color: white; background: #10211b; }
.back-link { color: #d9e4de; text-decoration: none; font-size: 13px; }
.player-divider { width: 1px; height: 24px; background: #395046; }
.player-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.save-state { display: flex; align-items: center; gap: 8px; color: #aebdb6; font-size: 11px; }
.save-dot { width: 7px; height: 7px; border-radius: 50%; background: #718078; }
.save-state.saved .save-dot { background: var(--lime); }
.course-frame { width: 100%; height: 100%; border: 0; background: white; }

.admin-main { min-height: calc(100vh - 72px); padding: 58px clamp(24px, 7vw, 104px) 90px; max-width: 1500px; margin: auto; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 38px; }
.admin-heading h1 { color: var(--ink); font-size: clamp(42px, 5vw, 62px); line-height: 1; }
.admin-heading p { color: var(--muted); margin: 12px 0 0; }
.admin-primary { border: 0; padding: 14px 19px; color: white; background: var(--green); cursor: pointer; font-weight: 600; font-size: 12px; }
.admin-export { padding: 14px 19px; color: #9e9a98; border: 1px solid #2a2a2a; background: transparent; font-weight: 600; font-size: 12px; text-decoration: none; border-radius: 4px; }
.admin-export:hover { color: #f5f5f3; border-color: #444; }
.admin-primary:disabled { cursor: not-allowed; opacity: .45; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 50px; }
.metric-card { min-height: 145px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); background: var(--paper); }
.metric-card > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.metric-card strong { margin-top: auto; font-family: "Newsreader", serif; font-size: 28px; }
.metric-card small { color: var(--muted); margin-top: 5px; }
.metric-card.accent { border-color: var(--green); color: white; background: var(--green); }
.metric-card.accent > span, .metric-card.accent small { color: #c5d8cf; }
.admin-panel { padding: 30px; border: 1px solid var(--line); background: var(--paper); }
.admin-panel h2 { font-size: 32px; }
.learner-table { width: 100%; border-collapse: collapse; }
.learner-table th { padding: 13px 12px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; }
.learner-table td { padding: 17px 12px; border-bottom: 1px solid #e8e8e2; font-size: 12px; }
.learner-table td:first-child strong, .learner-table td:first-child small { display: block; }
.learner-table td:first-child small { margin-top: 3px; color: var(--muted); }
.admin-status { display: inline-block; padding: 5px 8px; border-radius: 20px; color: #6c735f; background: #eef0e4; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.admin-status.in-progress { color: #8a5d13; background: #f8ecd4; }
.admin-status.completed { color: #246345; background: #def0e6; }
.table-progress { min-width: 180px; white-space: nowrap; vertical-align: middle; }
.table-progress > div { display: inline-block; width: 110px; height: 4px; margin-right: 10px; vertical-align: middle; background: #e1e4dd; }
.table-progress > div span { display: block; height: 100%; background: var(--green); }
.table-progress small { display: inline-block; vertical-align: middle; color: var(--muted); }
.row-action { border: 0; color: #9a4f3f; background: transparent; cursor: pointer; font-size: 11px; }
.invite-dialog { width: min(470px, calc(100vw - 32px)); padding: 0; border: 0; box-shadow: 0 25px 80px rgba(0,0,0,.3); }
.invite-dialog::backdrop { background: rgba(16,33,27,.78); }
.invite-dialog form { padding: 36px; position: relative; }
.invite-dialog h2 { margin-bottom: 8px; }
.invite-dialog p { margin: 0 0 25px; color: var(--muted); font-size: 13px; }
.invite-dialog label { display: block; margin: 16px 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.invite-dialog input { width: 100%; margin-top: 7px; padding: 13px; border: 1px solid var(--line); background: #faf9f4; color: var(--ink); }
.invite-dialog .admin-primary { width: 100%; margin-top: 10px; }
.dialog-close { position: absolute; right: 20px; top: 16px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; }

@media (max-width: 700px) {
  .learner span:last-child { display: none; }
  .hero { align-items: flex-start; flex-direction: column; padding-top: 46px; }
  .upload-button { width: 100%; }
  .library { padding-top: 40px; }
  .portal-nav > a { display: none; }
  .admin-heading { align-items: stretch; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .admin-panel { padding: 20px 12px; }
  .learner-table-wrap { overflow-x: auto; }
}

@media (min-width: 701px) and (max-width: 1000px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
}

/* Risk Facilitator brand skin */
:root {
  --ink: #f5f5f3;
  --muted: #aaa7a6;
  --cream: #050505;
  --paper: #0c0c0c;
  --lime: #ff5b17;
  --green: #ff5b17;
  --line: #2a2929;
  --coral: #ff5b17;
}

body {
  color: var(--ink);
  background: #050505;
  font-family: "Helvetica Neue", "DM Sans", Arial, sans-serif;
  font-weight: 300;
}

.topbar {
  height: 92px;
  padding: 0 clamp(24px, 7vw, 108px);
  background: #050505;
  border-bottom: 1px solid #1b1b1b;
}

.brand { gap: 10px; font-size: 21px; font-weight: 300; letter-spacing: -.05em; }
.brand-logo { display: block; width: auto; height: 34px; object-fit: contain; }
.portal-nav > a { color: #bcb9b8; font-size: 14px; font-weight: 300; }
.portal-nav > a:hover { color: #ff5b17; }
.avatar { background: #262525; color: #ff6a28; }
.learner { color: #a6a3a2; font-weight: 300; }
.logout-button {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid #555;
  color: #aaa7a6;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 300;
}
.logout-button:hover { color: #ff6a28; border-color: #ff6a28; }

.hero {
  min-height: 430px;
  padding: 72px clamp(24px, 7vw, 108px);
  color: #f5f5f3;
  background: #050505;
  border-bottom: 1px solid #202020;
}
.hero::after {
  width: 520px;
  height: 520px;
  right: 12%;
  top: -270px;
  border-color: rgba(255,91,23,.32);
  box-shadow: 0 0 0 80px rgba(255,91,23,.025), 0 0 0 160px rgba(255,91,23,.02);
}
.eyebrow, .hero .eyebrow { color: #ff5b17; }
h1, h2 { font-family: "Helvetica Neue", "DM Sans", Arial, sans-serif; font-weight: 200; letter-spacing: -.045em; }
h1 { font-size: clamp(51px, 6.5vw, 88px); line-height: .96; }
.hero h1 { max-width: 700px; font-size: clamp(42px, 4.2vw, 64px); line-height: 1.04; }
.hero p { color: #9e9a98; max-width: 550px; font-size: 17px; font-weight: 300; }

.upload-button, .admin-primary {
  color: #080808;
  background: #ff5b17;
  border-radius: 999px;
  box-shadow: none;
  font-weight: 400;
}
.upload-button { padding: 18px 28px; }
.upload-button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,91,23,.16); }
.upload-button small { color: #5e230b; }

.library { max-width: 1500px; }
.course-card { background: #0b0b0b; border-color: #2a2929; }
.course-card:hover { border-color: #514f4e; box-shadow: 0 16px 45px rgba(0,0,0,.5); }
.cover, .course-card:nth-child(3n+2) .cover, .course-card:nth-child(3n+3) .cover { background: #171717; }
.cover-art i { border-color: rgba(255,91,23,.5); }
.status-row, .course-count { color: #8f8c8a; }
.title { font-weight: 300; }
.progress-track { background: #292929; }
.progress-fill { background: #ff5b17; }
.launch-button { color: #050505; background: #ff5b17; border-radius: 999px; padding-left: 18px; }
.delete-button { border-color: #333; color: #8f8c8a; border-radius: 50%; }
.empty-state { border-color: #363434; }
.empty-icon { color: #ff5b17; background: #1d1613; }
.text-button { color: #ff6a28; border-color: #ff6a28; }
.notice { color: #f0c7b4; background: #25130c; border-color: #ff5b17; }

.admin-main { background: #050505; }
.admin-heading h1 { color: #f5f5f3; }
.admin-heading p { color: #9e9a98; font-size: 16px; }
.metric-card { border-color: #292929; background: #0c0c0c; }
.metric-card strong { font-family: "Helvetica Neue", sans-serif; font-weight: 200; }
.metric-card.accent { border-color: #ff5b17; color: #050505; background: #ff5b17; }
.metric-card.accent > span, .metric-card.accent small { color: #5c2109; }
.admin-panel { border-color: #292929; background: #0c0c0c; }
.learner-table th, .learner-table td { border-color: #292929; }
.learner-table td:first-child small { color: #8f8c8a; }
.admin-status { color: #aaa; background: #202020; }
.admin-status.in-progress { color: #ff9c6e; background: #2c160d; }
.admin-status.completed { color: #ffc1a4; background: #3a1b0f; }
.table-progress > div { background: #292929; }
.table-progress > div span { background: #ff5b17; }
.row-action { color: #ff7c43; }
.invite-dialog { color: #f5f5f3; background: #101010; }
.invite-dialog::backdrop { background: rgba(0,0,0,.84); }
.invite-dialog input { border-color: #353535; color: #f5f5f3; background: #171717; }
.dialog-close { color: #999; }

.player-bar { background: #050505; border-bottom: 1px solid #282828; }
.back-link { color: #ff6a28; }
.player-divider { background: #383838; }
.save-state.saved .save-dot { background: #ff5b17; }

.auth-body { min-height: 100vh; background: #050505; }
.auth-header {
  height: 92px;
  padding: 0 clamp(24px, 7vw, 108px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1b1b1b;
}
.auth-logo { display: block; width: auto; height: 32px; }
.auth-shell {
  min-height: calc(100vh - 92px);
  padding: clamp(48px, 7vw, 90px) clamp(24px, 7vw, 108px);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: clamp(50px, 8vw, 140px);
  position: relative;
  overflow: hidden;
}
.auth-shell::before {
  content: "";
  width: 500px;
  height: 500px;
  position: absolute;
  left: 10%;
  top: -330px;
  border: 1px solid rgba(255,91,23,.3);
  border-radius: 50%;
  box-shadow: 0 0 0 75px rgba(255,91,23,.02), 0 0 0 150px rgba(255,91,23,.015);
  pointer-events: none;
}
.auth-intro, .auth-card { position: relative; z-index: 1; }
.auth-intro h1 { margin-top: 18px; font-size: clamp(36px, 4.5vw, 62px); font-family: 'Futura Lt BT', 'Century Gothic', sans-serif; font-weight: 300; }
.auth-card h2 { margin: 10px 0 30px; font-size: 42px; font-family: 'Futura Lt BT', 'Century Gothic', sans-serif; font-weight: 300; }
.auth-intro p { max-width: 480px; margin-top: 26px; color: #9e9a98; font-size: 17px; line-height: 1.6; }
.auth-card { padding: clamp(28px, 4vw, 48px); border: 1px solid #2a2929; background: #0c0c0c; }
.auth-form label { display: block; margin: 17px 0; color: #aaa7a6; font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.auth-form input {
  width: 100%;
  margin-top: 8px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #3a3939;
  border-radius: 0;
  outline: 0;
  color: #f5f5f3;
  background: transparent;
  font-size: 16px;
  font-weight: 300;
}
.auth-form input:focus { border-color: #ff5b17; }
.auth-submit {
  width: 100%;
  margin-top: 24px;
  padding: 15px 21px;
  display: flex;
  justify-content: space-between;
  border: 0;
  border-radius: 999px;
  color: #050505;
  background: #ff5b17;
  cursor: pointer;
  font-weight: 500;
}
.auth-submit:disabled { cursor: wait; opacity: .55; }
.auth-switch, .staging-note { color: #8f8c8a; font-size: 12px; text-align: center; }
.auth-switch { margin: 24px 0 0; }
.auth-switch a { color: #ff6a28; }
.staging-note { margin: 12px 0 0; }
.password-help { display: block; margin-top: -9px; color: #777; font-size: 10px; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 24px; border: 1px solid #343333; }
.account-tab { padding: 12px; border: 0; color: #aaa; background: transparent; cursor: pointer; }
.account-tab.active { color: #050505; background: #ff5b17; }
.business-fields { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }

@media (max-width: 700px) {
  .topbar { height: 76px; }
  .brand { font-size: 18px; }
  .brand-logo { width: auto; height: 28px; }
  .hero { min-height: 520px; }
  .portal-nav { gap: 14px; }
  .logout-button { font-size: 11px; }
  .auth-header { height: 76px; }
  .auth-logo { height: 32px; }
  .auth-shell { min-height: calc(100vh - 76px); grid-template-columns: 1fr; gap: 38px; }
  .auth-intro h1 { font-size: 54px; }
  .auth-card { padding: 26px 22px; }
  .business-fields { grid-template-columns: 1fr; gap: 0; }
}
