:root {
  color-scheme: light;

  /* Fixed design tokens we keep from the initial mock */
  --font-ui: "Avenir Next", "SF Pro Text", system-ui, sans-serif;
  --radius-card: 28px;
  --radius-pill: 999px;

  /* Palette extracted from the provided medical reference */
  --bg: #f7f7ff;
  --bg-soft: #f3f1ff;
  --panel: #ffffff;
  --text: #121933;
  --muted: #70779b;
  --primary: #4f63d8;
  --primary-deep: #3347b8;
  --line: #d9ddf7;
  --accent-warm: #f6b63f;
  --shadow: rgba(39, 53, 123, 0.12);
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(79, 99, 216, 0.14), transparent 18rem),
    radial-gradient(circle at bottom right, rgba(217, 221, 247, 0.75), transparent 20rem),
    linear-gradient(180deg, #fcfcff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-ui);
}

.workspace-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.workspace-card {
  width: min(100%, 1100px);
  padding: clamp(1.5rem, 3vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.98)),
    var(--panel);
  box-shadow: 0 28px 90px var(--shadow);
}

.workspace-copy {
  max-width: 48rem;
  margin-bottom: 2rem;
}

.workspace-eyebrow,
.token-label {
  margin: 0 0 0.9rem;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.workspace-lead,
.token-text,
.swatch-name,
.swatch-code {
  color: var(--muted);
  line-height: 1.6;
}

.workspace-lead {
  margin-top: 1.2rem;
  max-width: 44rem;
  font-size: 1.05rem;
}

.workspace-lead--sm {
  max-width: 38rem;
  font-size: 1rem;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.token-panel,
.palette-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.78);
}

.token-panel {
  padding: 1.5rem;
}

.token-text + .token-text {
  margin-top: 0.45rem;
}

.palette-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 1.25rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(79, 99, 216, 0.12), transparent 16rem),
    rgba(243, 241, 255, 0.6);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.swatch {
  padding: 0.85rem;
  border: 1px solid rgba(217, 221, 247, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.85);
}

.swatch-chip {
  width: 100%;
  aspect-ratio: 1.4;
  margin-bottom: 0.75rem;
  border-radius: 18px;
}

.swatch-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.swatch-code {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.swatch-chip--primary {
  background: #4f63d8;
}

.swatch-chip--primary-deep {
  background: #3347b8;
}

.swatch-chip--canvas {
  background: #f3f1ff;
}

.swatch-chip--surface {
  background: #ffffff;
  border: 1px solid #e6e9fb;
}

.swatch-chip--ink {
  background: #121933;
}

.swatch-chip--muted {
  background: #70779b;
}

.swatch-chip--line {
  background: #d9ddf7;
}

.swatch-chip--rating {
  background: #f6b63f;
}

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

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

@media (max-width: 640px) {
  .workspace-shell {
    padding: 1rem;
  }

  .workspace-card,
  .token-panel,
  .palette-panel {
    border-radius: 24px;
  }

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

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

.landing-page {
  min-height: 100vh;
  background: #f3f2ff;
}

.landing-page .site-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  overflow: hidden;
  min-height: 34px;
  background: linear-gradient(180deg, #4f63d8, #3347b8);
  box-shadow: 0 10px 24px rgba(51, 71, 184, 0.14);
}

.landing-page .site-topbar__track {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  height: 34px;
  padding-inline: 1.25rem;
  animation: site-topbar-marquee 32s linear infinite;
}

.landing-page .site-topbar__text {
  padding-right: 2.5rem;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.landing-page .landing-shell {
  width: min(100% - 4rem, 1380px);
  margin: 0 auto;
  padding-bottom: 3rem;
}

.landing-page .site-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-top: 0;
  background: linear-gradient(180deg, rgba(243, 242, 255, 0.98), rgba(243, 242, 255, 0.88) 72%, rgba(243, 242, 255, 0));
  backdrop-filter: blur(14px);
}

.landing-page .site-header {
  width: 100%;
  padding: 0.25rem 0 0;
}

.landing-page .site-header__inner {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr minmax(260px, auto);
  align-items: center;
  gap: 1.5rem;
  width: min(100% - 4rem, 1380px);
  margin: 0 auto;
  min-height: 56px;
}

.landing-page .site-header__brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.landing-page .site-header__logo {
  display: block;
  width: auto;
  height: 36px;
}

.landing-page .site-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-width: 0;
}

.landing-page .site-header__link {
  color: rgba(18, 25, 51, 0.76);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.landing-page .site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.landing-page .site-header__phone {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.landing-page .site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border: 1px solid rgba(79, 99, 216, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary-deep);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(79, 99, 216, 0.08);
}

.landing-page .hero {
  display: grid;
  grid-template-columns: minmax(520px, 590px) minmax(620px, 1fr);
  align-items: start;
  justify-content: space-between;
  gap: clamp(2rem, 3vw, 4rem);
  min-height: calc(100vh - 96px);
  padding: 0 0 clamp(2rem, 4vw, 3.5rem);
}

.landing-page .hero__copy {
  max-width: 590px;
  align-self: start;
  transform: translateY(105px);
}

.landing-page .hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 42px;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  margin: 0 0 1.3rem;
  border: 1px solid rgba(79, 99, 216, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 28px rgba(39, 53, 123, 0.08);
  color: rgba(18, 25, 51, 0.82);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.landing-page .hero__eyebrow::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  box-shadow: 0 0 0 0.35rem rgba(79, 99, 216, 0.12);
}

.landing-page .hero__title,
.landing-page .hero__subtitle,
.landing-page .hero__note {
  margin: 0;
}

.landing-page .hero__title {
  max-width: 590px;
  font-size: 54px;
  line-height: 0.94;
  letter-spacing: -0.06em;
  color: var(--text);
  font-weight: 700;
}

.landing-page .hero__subtitle {
  margin-top: 1.7rem;
  width: auto;
  max-width: 590px;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--primary);
  font-weight: 400;
}

.landing-page .hero__actions {
  margin-top: 2.9rem;
  max-width: 460px;
}

.landing-page .hero__button {
  display: inline-block;
  position: relative;
  isolation: isolate;
  padding: 2px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 20px 40px rgba(51, 71, 184, 0.2);
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.landing-page .hero__button::before {
  content: none;
}

.landing-page .hero__button::after {
  content: none;
}

.landing-page .hero__button:hover {
  animation: hero-button-pulse 2.6s ease-in-out infinite;
  transform: translateY(-1px);
}

.landing-page .hero__button-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 292px;
  min-height: 74px;
  padding: 1rem 2.4rem;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.landing-page .hero__note {
  max-width: 430px;
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.landing-page .hero__visual {
  position: relative;
  min-height: 740px;
  display: grid;
  align-items: end;
  justify-items: end;
  overflow: hidden;
}

.landing-page .hero__figure {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 720px;
  display: grid;
  align-items: end;
  justify-items: end;
}

.landing-page .hero__image {
  position: relative;
  z-index: 1;
  width: 1080px;
  height: auto;
  object-fit: contain;
  object-position: right bottom;
  filter: none;
  transform: translate(-332px, -28px);
}

@keyframes hero-button-pulse {
  0% {
    box-shadow:
      0 20px 40px rgba(51, 71, 184, 0.2),
      0 0 0 rgba(115, 140, 255, 0),
      0 0 0 rgba(143, 168, 255, 0);
  }

  50% {
    box-shadow:
      0 26px 54px rgba(51, 71, 184, 0.28),
      0 0 28px rgba(115, 140, 255, 0.28),
      0 0 54px rgba(143, 168, 255, 0.18);
  }

  100% {
    box-shadow:
      0 20px 40px rgba(51, 71, 184, 0.2),
      0 0 0 rgba(115, 140, 255, 0),
      0 0 0 rgba(143, 168, 255, 0);
  }
}

@keyframes site-topbar-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-25%);
  }
}

@media (max-width: 980px) {
  .landing-page .landing-shell {
    width: min(100% - 1.5rem, 1380px);
  }

  .landing-page .site-chrome {
    padding-top: 0;
  }

  .landing-page .site-header {
    padding-top: 1.25rem;
  }

  .landing-page .site-header__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
    width: min(100% - 1.5rem, 1380px);
  }

  .landing-page .site-header__nav,
  .landing-page .site-header__actions {
    flex-wrap: wrap;
  }

  .landing-page .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
    padding: 1.5rem 0 2.5rem;
  }

  .landing-page .hero__copy {
    max-width: 100%;
  }

  .landing-page .hero__title {
    max-width: 590px;
  }

  .landing-page .hero__visual {
    min-height: 580px;
    justify-items: center;
  }

  .landing-page .hero__figure {
    width: min(100%, 760px);
    min-height: 560px;
    justify-items: center;
  }

  .landing-page .hero__image {
    width: min(100%, 760px);
    transform: translate(0, 12px);
  }
}

@media (max-width: 640px) {
  .landing-page .landing-shell {
    width: min(100% - 1rem, 1380px);
  }

  .landing-page .site-topbar {
    min-height: 32px;
  }

  .landing-page .site-topbar__track {
    height: 32px;
  }

  .landing-page .site-topbar__text {
    font-size: 0.76rem;
  }

  .landing-page .site-header {
    padding-top: 1rem;
  }

  .landing-page .site-header__inner {
    justify-items: start;
    width: min(100% - 1rem, 1380px);
  }

  .landing-page .site-header__nav {
    gap: 1rem 1.25rem;
    justify-content: flex-start;
  }

  .landing-page .site-header__actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .landing-page .site-header__cta {
    min-height: 44px;
    padding-inline: 1rem;
    font-size: 0.9rem;
  }

  .landing-page .hero {
    padding: 1.5rem 0 2rem;
  }

  .landing-page .hero__title {
    max-width: 11ch;
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .landing-page .hero__subtitle {
    max-width: 590px;
    font-size: 1.125rem;
  }

  .landing-page .hero__button-label {
    min-width: 250px;
    min-height: 64px;
    font-size: 1rem;
  }

  .landing-page .hero__visual {
    min-height: 440px;
  }

  .landing-page .hero__figure {
    width: 100%;
    min-height: 420px;
  }

  .landing-page .hero__image {
    width: min(100%, 470px);
    transform: translate(0, 12px);
  }
}
