* {
  box-sizing: border-box;
}

:root {
  --phone-width: 430px;
  --phone-height: 932px;
  --ink: #171717;
  --muted: #667085;
  --line: #e5e7eb;
  --page: #f6f7f2;
  --green: #12715b;
  --teal: #0f766e;
  --coral: #e86f51;
  --amber: #f0a23a;
  --violet: #6d5bd0;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--ink);
}

body.prototype-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 16px);
  background:
    linear-gradient(135deg, rgba(18, 113, 91, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(232, 111, 81, 0.08), transparent 36%),
    #edf1f5;
}

body.index-body {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 34px);
  background: #eef2f6;
}

body.portal-body {
  min-height: 100vh;
  margin: 0;
  padding: clamp(22px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(18, 113, 91, 0.1), transparent 34%),
    linear-gradient(315deg, rgba(232, 111, 81, 0.1), transparent 34%),
    #eef2f6;
}

.portal-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(28px, 5vw, 54px);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #121826;
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 32px rgba(18, 24, 38, 0.18);
}

.portal-hero {
  max-width: 780px;
  margin-bottom: 28px;
}

.portal-hero h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: 0;
}

.portal-hero p {
  margin: 18px 0 0;
  max-width: 650px;
  color: #475467;
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.65;
  font-weight: 650;
}

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

.role-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 22px 48px rgba(16, 24, 40, 0.12);
  text-decoration: none;
  color: #101828;
  display: flex;
  flex-direction: column;
}

.role-media {
  height: 188px;
  position: relative;
  overflow: hidden;
}

.role-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.role-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.36));
}

.role-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.role-body h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 950;
}

.role-body p {
  margin: 12px 0 18px;
  color: #667085;
  line-height: 1.55;
  font-size: 14px;
  font-weight: 650;
}

.role-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #121826;
  color: #ffffff;
}

.index-hero {
  max-width: 1480px;
  margin: 0 auto 28px;
}

.index-grid {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(466px, 1fr));
  gap: 28px;
  align-items: start;
}

.prototype-tile {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 48px rgba(18, 24, 38, 0.12);
}

.prototype-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  color: #20242c;
}

.prototype-title span {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.prototype-iframe {
  width: 466px;
  height: 968px;
  border: 0;
  display: block;
  margin: 0 auto;
  background: transparent;
}

.phone-shell {
  width: min(var(--phone-width), calc(100vw - 32px));
  height: min(var(--phone-height), calc((100vw - 32px) * 932 / 430));
  padding: 10px;
  border-radius: 54px;
  background: linear-gradient(145deg, #15171b, #353841);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 30px 70px rgba(16, 24, 40, 0.34);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 44px;
  background: var(--page);
  display: flex;
  flex-direction: column;
}

.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 35px;
  border-radius: 999px;
  background: #060708;
  z-index: 30;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.08);
}

.status-bar {
  height: 54px;
  padding: 14px 26px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 800;
  color: #101318;
  position: relative;
  z-index: 20;
}

.status-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}

.battery {
  width: 24px;
  height: 12px;
  border: 1.8px solid #111318;
  border-radius: 4px;
  position: relative;
  margin-left: 2px;
}

.battery::before {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 5px;
  background: #111318;
  border-radius: 2px;
}

.battery::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 6px;
  border-radius: 2px;
  background: #111318;
}

.app-header {
  padding: 2px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 15;
}

.header-copy {
  min-width: 0;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--teal);
}

.page-title {
  margin: 1px 0 0;
  font-size: 25px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.subcopy {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.84);
  color: #20242c;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
  flex: 0 0 auto;
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px 112px;
  scrollbar-width: none;
  position: relative;
  z-index: 5;
}

.screen-scroll::-webkit-scrollbar {
  display: none;
}

.screen-scroll.with-cta {
  padding-bottom: 178px;
}

.bottom-tab {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  padding: 8px 12px 18px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(16, 24, 40, 0.08);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  z-index: 40;
  backdrop-filter: blur(18px);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  color: #8a92a2;
  font-size: 11px;
  font-weight: 800;
  min-width: 0;
}

.tab-item i {
  font-size: 18px;
}

.tab-item.active {
  color: var(--teal);
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 2px 0 14px;
}

.search-field {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  color: #8a92a2;
  font-size: 14px;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  color: #475467;
  white-space: nowrap;
}

.pill.green {
  color: var(--green);
  background: #e6f4ef;
  border-color: #c9e6dc;
}

.pill.coral {
  color: #ae432c;
  background: #fff0eb;
  border-color: #ffd5c8;
}

.pill.amber {
  color: #98620e;
  background: #fff5dd;
  border-color: #f8d895;
}

.pill.violet {
  color: #5645aa;
  background: #efedff;
  border-color: #d8d1ff;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.section-head a,
.section-head span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.hero-banner {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  background: #263238;
}

.hero-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 26, 28, 0.78), rgba(14, 26, 28, 0.18));
  z-index: -1;
}

.banner-copy h2 {
  margin: 7px 0 7px;
  font-size: 25px;
  line-height: 1.06;
  font-weight: 950;
  max-width: 260px;
}

.banner-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
  max-width: 280px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.action-item {
  display: block;
  min-width: 0;
  text-align: center;
  text-decoration: none;
  color: #333942;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.action-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 7px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08);
  color: var(--teal);
  font-size: 20px;
}

.surface-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.06);
}

.row-card {
  padding: 13px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #e5e7eb;
}

.card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 4px 0 0;
}

.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tiny-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  padding: 12px 10px;
  text-align: center;
}

.metric strong {
  display: block;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 950;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid rgba(16, 24, 40, 0.1);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 8px 12px;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.chip.active {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.filter-panel {
  padding: 12px;
}

.filter-panel .chips {
  flex-wrap: wrap;
  overflow: visible;
  padding-bottom: 0;
}

.task-card {
  padding: 14px;
  margin-top: 10px;
}

.task-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.task-pay {
  color: var(--coral);
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.company-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.company-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.divider {
  height: 1px;
  background: rgba(16, 24, 40, 0.08);
  margin: 12px 0;
}

.detail-hero {
  margin: 0 -18px 16px;
  min-height: 238px;
  position: relative;
  color: #fff;
  overflow: hidden;
  padding: 18px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
  z-index: -1;
}

.detail-title {
  margin: 8px 0 8px;
  font-size: 26px;
  line-height: 1.08;
  font-weight: 950;
}

.info-list {
  display: grid;
  gap: 9px;
}

.info-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  padding: 12px;
}

.info-row b {
  color: #344054;
  font-size: 13px;
}

.info-row span,
.info-row p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
  margin-top: 2px;
}

.timeline-body {
  padding: 11px 12px;
}

.timeline-body h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.timeline-body p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.sticky-cta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 104px;
  z-index: 38;
}

.primary-button {
  height: 50px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #121826;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(18, 24, 38, 0.25);
}

.secondary-button {
  height: 44px;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
}

.progress-strip {
  padding: 14px;
  background: #111827;
  color: #fff;
  border-radius: 8px;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill {
  height: 100%;
  width: var(--progress, 62%);
  background: #39d0a1;
  border-radius: 999px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 82px 1fr 40px;
  gap: 9px;
  align-items: center;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--bar, 50%);
  border-radius: inherit;
  background: var(--teal);
}

.risk-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--teal);
  display: inline-block;
  margin-right: 6px;
}

.risk-dot.warn {
  background: var(--amber);
}

.risk-dot.danger {
  background: var(--coral);
}

.coach-score {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #10241f;
  color: #ffffff;
  border-radius: 8px;
}

.score-ring {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #10241f 57%, transparent 58%),
    conic-gradient(#39d0a1 0 78%, rgba(255, 255, 255, 0.15) 78% 100%);
  display: grid;
  place-items: center;
}

.score-ring strong {
  font-size: 30px;
  font-weight: 950;
}

.coach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.coach-tile {
  padding: 14px;
  min-height: 126px;
}

.coach-tile i {
  color: var(--teal);
  font-size: 20px;
}

.coach-tile h3 {
  margin: 12px 0 5px;
  font-size: 14px;
  font-weight: 900;
}

.coach-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.rank-row {
  padding: 12px;
  display: grid;
  grid-template-columns: 30px 42px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}

.rank-num {
  font-weight: 950;
  color: var(--amber);
  text-align: center;
}

.avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 999px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.badge-item {
  padding: 12px 6px;
  text-align: center;
}

.badge-item i {
  color: var(--amber);
  font-size: 21px;
}

.badge-item span {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: #475467;
  font-weight: 850;
}

.profile-hero {
  padding: 16px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 13px;
  align-items: center;
  background: #13201d;
  color: #ffffff;
  border-radius: 8px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  object-fit: cover;
}

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

.menu-row {
  padding: 13px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
}

.menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eff7f4;
  color: var(--teal);
}

@media (max-width: 520px) {
  body.index-body {
    padding: 18px;
  }

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

  .prototype-iframe {
    width: 100%;
  }
}

@media (max-width: 940px) {
  .role-grid {
    grid-template-columns: 1fr;
  }

  .role-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .portal-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-hero h1 {
    font-size: clamp(34px, 12vw, 52px);
  }
}
