:root {
  --paper: #f8fbff;
  --surface: #ffffff;
  --ink: #0c1118;
  --muted: #596777;
  --line: #dce7f3;
  --blue: #4266ff;
  --cyan: #1bc6dd;
  --soft-blue: #edf3ff;
  --shadow: 0 24px 70px rgba(15, 35, 70, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(90deg, rgba(12, 17, 24, 0.055) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(180deg, rgba(12, 17, 24, 0.04) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.shell {
  width: min(940px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.shell--qr {
  width: min(560px, calc(100% - 28px));
  min-height: 100svh;
  padding: clamp(18px, 5svh, 44px) 0;
  align-items: center;
}

.profile,
.qr-panel,
.qr-display {
  background: color-mix(in srgb, var(--surface) 94%, var(--soft-blue));
  border: 1px solid rgba(118, 151, 190, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 62px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "logo"
    "identity"
    "actions"
    "details";
  gap: 28px;
}

.profile::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), #111827);
}

.profile--clinical::after {
  background: linear-gradient(90deg, #111827, var(--blue), var(--cyan));
}

.logo-lockup {
  grid-area: logo;
}

.logo-lockup img {
  display: block;
  width: min(520px, 100%);
  height: auto;
}

.identity {
  grid-area: identity;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 6.2vw, 5.6rem);
  line-height: 0.95;
  font-weight: 760;
  letter-spacing: 0;
  overflow-wrap: normal;
}

h1 span {
  display: block;
}

.role {
  margin: 18px 0 0;
  color: var(--blue);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 720;
}

.signal {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.actions {
  grid-area: actions;
  align-self: start;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
}

.actions--compact {
  max-width: 440px;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
}

.action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.action:hover,
.action:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--blue) 46%, var(--line));
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(66, 102, 255, 0.13);
  outline: none;
}

.action--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.action--primary:hover,
.action--primary:focus-visible {
  background: #17202c;
}

.action__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.action__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.details {
  grid-area: details;
  margin: 4px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.details div {
  min-width: 0;
}

.details dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.details dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.details a {
  text-decoration-color: color-mix(in srgb, var(--blue), transparent 40%);
  text-underline-offset: 4px;
}

.qr-panel {
  padding: 22px;
  align-self: center;
  text-align: center;
}

.qr-panel__title {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.qr-panel img {
  display: block;
  width: min(100%, 244px);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.qr-panel__note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.qr-display {
  width: 100%;
  min-height: min(720px, calc(100svh - 36px));
  padding: clamp(24px, 6vw, 38px);
  text-align: center;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(14px, 2.4svh, 22px);
  justify-items: center;
}

.qr-display .logo-lockup {
  grid-area: auto;
}

.qr-display__brand,
.qr-display__footer {
  display: grid;
  justify-items: center;
}

.qr-display__brand {
  gap: 8px;
}

.qr-display__footer {
  gap: 12px;
}

.logo-lockup--qr img {
  width: min(270px, 82%);
  height: auto;
  margin: 0 auto;
}

.qr-display__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 820;
  line-height: 1.1;
}

.qr-display__code {
  align-self: center;
  display: block;
  width: min(82vw, 380px);
  max-height: min(58svh, 380px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.qr-display__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.qr-display .action {
  min-width: 180px;
}

code {
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .shell--qr {
    align-items: center;
  }

  .profile {
    min-height: auto;
  }

  .qr-panel {
    width: min(360px, 100%);
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 22px, 520px);
    padding: 16px 0 28px;
    gap: 14px;
  }

  .shell--qr {
    width: min(100% - 18px, 520px);
    min-height: 100svh;
    padding: 10px 0;
  }

  .qr-display {
    min-height: calc(100svh - 20px);
    padding: 18px;
  }

  .logo-lockup--qr img {
    width: min(220px, 74%);
  }

  .qr-display__code {
    width: min(84vw, 360px);
    max-height: min(56svh, 360px);
  }

  .profile {
    padding: 26px;
    gap: 24px;
  }

  .logo-lockup img {
    width: min(280px, 100%);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.65rem, 10.8vw, 3.6rem);
    line-height: 1;
  }

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

  .action--primary {
    grid-column: 1 / -1;
  }

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

  .actions--compact {
    max-width: none;
  }
}

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

@media (max-width: 390px) {
  .profile {
    padding: 22px 18px;
  }

  h1 {
    font-size: 2.45rem;
  }
}
